From c67ef29f20cce7af20dcd85191d1047248567747 Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Sat, 3 Apr 2021 10:34:27 -0500 Subject: [PATCH] add themidibus library --- libraries/README.md | 5 + libraries/themidibus/CHANGELOG.txt | 63 + .../themidibus/GNUGeneralPublicLicense.txt | 486 +++++ libraries/themidibus/INSTALL.txt | 7 + libraries/themidibus/README.md | 38 + .../bin/themidibus/ControlChange.class | Bin 0 -> 1396 bytes .../MidiBus$InputDeviceContainer.class | Bin 0 -> 926 bytes .../bin/themidibus/MidiBus$MReceiver.class | Bin 0 -> 1047 bytes .../MidiBus$OutputDeviceContainer.class | Bin 0 -> 873 bytes .../themidibus/bin/themidibus/MidiBus.class | Bin 0 -> 18455 bytes .../bin/themidibus/MidiListener.class | Bin 0 -> 75 bytes .../themidibus/bin/themidibus/Note.class | Bin 0 -> 2106 bytes .../bin/themidibus/ObjectMidiListener.class | Bin 0 -> 229 bytes .../bin/themidibus/RawMidiListener.class | Bin 0 -> 142 bytes .../bin/themidibus/SimpleMidiListener.class | Bin 0 -> 183 bytes .../bin/themidibus/StandardMidiListener.class | Bin 0 -> 173 bytes .../bin/themidibus/package-info.class | Bin 0 -> 116 bytes libraries/themidibus/build.xml | 55 + .../AdvancedMIDIMessageIO.pde | 102 + libraries/themidibus/examples/Basic/Basic.pde | 76 + .../BasicWithClasses/BasicWithClasses.pde | 78 + .../examples/MultipleBuses/MultipleBuses.pde | 115 ++ libraries/themidibus/library.properties | 11 + libraries/themidibus/library/themidibus.jar | Bin 0 -> 13167 bytes .../reference/allclasses-frame.html | 26 + .../reference/allclasses-noframe.html | 26 + .../themidibus/reference/constant-values.html | 111 + .../themidibus/reference/deprecated-list.html | 111 + libraries/themidibus/reference/help-doc.html | 208 ++ libraries/themidibus/reference/index-all.html | 700 +++++++ libraries/themidibus/reference/index.html | 64 + .../themidibus/reference/overview-tree.html | 138 ++ libraries/themidibus/reference/package-list | 1 + .../reference/resources/background.gif | Bin 0 -> 2313 bytes .../themidibus/reference/resources/tab.gif | Bin 0 -> 291 bytes .../reference/resources/titlebar.gif | Bin 0 -> 10701 bytes .../reference/resources/titlebar_end.gif | Bin 0 -> 849 bytes libraries/themidibus/reference/stylesheet.css | 474 +++++ .../reference/themidibus/ControlChange.html | 509 +++++ .../reference/themidibus/MidiBus.html | 1496 ++++++++++++++ .../reference/themidibus/MidiListener.html | 168 ++ .../themidibus/reference/themidibus/Note.html | 655 ++++++ .../themidibus/ObjectMidiListener.html | 257 +++ .../reference/themidibus/PApplet.html | 519 +++++ .../reference/themidibus/RawMidiListener.html | 221 ++ .../themidibus/SimpleMidiListener.html | 267 +++ .../themidibus/StandardMidiListener.html | 224 +++ .../reference/themidibus/package-frame.html | 30 + .../reference/themidibus/package-summary.html | 218 ++ .../reference/themidibus/package-tree.html | 134 ++ .../src/themidibus/ControlChange.java | 162 ++ .../themidibus/src/themidibus/MidiBus.java | 1783 +++++++++++++++++ .../src/themidibus/MidiListener.java | 35 + libraries/themidibus/src/themidibus/Note.java | 254 +++ .../src/themidibus/ObjectMidiListener.java | 59 + .../themidibus/src/themidibus/PApplet.java | 192 ++ .../src/themidibus/RawMidiListener.java | 40 + .../src/themidibus/SimpleMidiListener.java | 63 + .../src/themidibus/StandardMidiListener.java | 43 + .../src/themidibus/package-info.java | 42 + 60 files changed, 10266 insertions(+) create mode 100644 libraries/README.md create mode 100644 libraries/themidibus/CHANGELOG.txt create mode 100644 libraries/themidibus/GNUGeneralPublicLicense.txt create mode 100644 libraries/themidibus/INSTALL.txt create mode 100644 libraries/themidibus/README.md create mode 100644 libraries/themidibus/bin/themidibus/ControlChange.class create mode 100644 libraries/themidibus/bin/themidibus/MidiBus$InputDeviceContainer.class create mode 100644 libraries/themidibus/bin/themidibus/MidiBus$MReceiver.class create mode 100644 libraries/themidibus/bin/themidibus/MidiBus$OutputDeviceContainer.class create mode 100644 libraries/themidibus/bin/themidibus/MidiBus.class create mode 100644 libraries/themidibus/bin/themidibus/MidiListener.class create mode 100644 libraries/themidibus/bin/themidibus/Note.class create mode 100644 libraries/themidibus/bin/themidibus/ObjectMidiListener.class create mode 100644 libraries/themidibus/bin/themidibus/RawMidiListener.class create mode 100644 libraries/themidibus/bin/themidibus/SimpleMidiListener.class create mode 100644 libraries/themidibus/bin/themidibus/StandardMidiListener.class create mode 100644 libraries/themidibus/bin/themidibus/package-info.class create mode 100644 libraries/themidibus/build.xml create mode 100644 libraries/themidibus/examples/AdvancedMIDIMessageIO/AdvancedMIDIMessageIO.pde create mode 100644 libraries/themidibus/examples/Basic/Basic.pde create mode 100644 libraries/themidibus/examples/BasicWithClasses/BasicWithClasses.pde create mode 100644 libraries/themidibus/examples/MultipleBuses/MultipleBuses.pde create mode 100644 libraries/themidibus/library.properties create mode 100644 libraries/themidibus/library/themidibus.jar create mode 100644 libraries/themidibus/reference/allclasses-frame.html create mode 100644 libraries/themidibus/reference/allclasses-noframe.html create mode 100644 libraries/themidibus/reference/constant-values.html create mode 100644 libraries/themidibus/reference/deprecated-list.html create mode 100644 libraries/themidibus/reference/help-doc.html create mode 100644 libraries/themidibus/reference/index-all.html create mode 100644 libraries/themidibus/reference/index.html create mode 100644 libraries/themidibus/reference/overview-tree.html create mode 100644 libraries/themidibus/reference/package-list create mode 100644 libraries/themidibus/reference/resources/background.gif create mode 100644 libraries/themidibus/reference/resources/tab.gif create mode 100644 libraries/themidibus/reference/resources/titlebar.gif create mode 100644 libraries/themidibus/reference/resources/titlebar_end.gif create mode 100644 libraries/themidibus/reference/stylesheet.css create mode 100644 libraries/themidibus/reference/themidibus/ControlChange.html create mode 100644 libraries/themidibus/reference/themidibus/MidiBus.html create mode 100644 libraries/themidibus/reference/themidibus/MidiListener.html create mode 100644 libraries/themidibus/reference/themidibus/Note.html create mode 100644 libraries/themidibus/reference/themidibus/ObjectMidiListener.html create mode 100644 libraries/themidibus/reference/themidibus/PApplet.html create mode 100644 libraries/themidibus/reference/themidibus/RawMidiListener.html create mode 100644 libraries/themidibus/reference/themidibus/SimpleMidiListener.html create mode 100644 libraries/themidibus/reference/themidibus/StandardMidiListener.html create mode 100644 libraries/themidibus/reference/themidibus/package-frame.html create mode 100644 libraries/themidibus/reference/themidibus/package-summary.html create mode 100644 libraries/themidibus/reference/themidibus/package-tree.html create mode 100644 libraries/themidibus/src/themidibus/ControlChange.java create mode 100644 libraries/themidibus/src/themidibus/MidiBus.java create mode 100644 libraries/themidibus/src/themidibus/MidiListener.java create mode 100644 libraries/themidibus/src/themidibus/Note.java create mode 100644 libraries/themidibus/src/themidibus/ObjectMidiListener.java create mode 100644 libraries/themidibus/src/themidibus/PApplet.java create mode 100644 libraries/themidibus/src/themidibus/RawMidiListener.java create mode 100644 libraries/themidibus/src/themidibus/SimpleMidiListener.java create mode 100644 libraries/themidibus/src/themidibus/StandardMidiListener.java create mode 100644 libraries/themidibus/src/themidibus/package-info.java diff --git a/libraries/README.md b/libraries/README.md new file mode 100644 index 0000000..3e74fb4 --- /dev/null +++ b/libraries/README.md @@ -0,0 +1,5 @@ +# libraries + +in Processing, you can add libraries inside of the IDE, which has a barebones +dependency manager. I honestly don't know if these are worth versioning, but +I'd rather have files to delete than be missing files. diff --git a/libraries/themidibus/CHANGELOG.txt b/libraries/themidibus/CHANGELOG.txt new file mode 100644 index 0000000..4a99d31 --- /dev/null +++ b/libraries/themidibus/CHANGELOG.txt @@ -0,0 +1,63 @@ +-Version 008 + Changes: + -Remove register/unregister dispose to be compatible with Processing 3.0 + +-Version 007 + + Changes: + -Added constructors to MidiBus which allow parent as Object, for use outside of Processing + -Simplify constructors + -Stop using deprecated methods from processing 1.0, switch to new processing 2.0 methods + -Introduce new class called Note and ControlChange + -Provide an object oriented interface using Note and ControlChange both via processing (PApplet) and with callbacks with listeners + -Allow sending timestamps to be disabled so MMJ can be used + -Attempted to improve startup speed + +-Version 005 + + Changes: + -Added library.properties for Processing 2.0 + -Added permanent URL for latest version http://www.smallbutdigital.com/releases/themidibus/themidibus-latest.zip and library.properties file http://www.smallbutdigital.com/releases/themidibus/themidibus-latest.txt + + Bug Fixes: + -Fixed two small issues in sendMessage(byte[] data) which made the method mostly useless before. + + Notable Bug Fixes: + -Fixed uninitialized listeners vector. + -Fixed available/unavailable devices detection: version 003 would sometimes list unavailable devices as available. + -Fixed exceptional cases which threw NullPointer exceptions. + -Added try-catch statements to catch some unusual exception from MMJ mac MIDI subsystem + -Implemented workaround for MMJ malloc problems when closing devices. + + Changes: + -New devices indexing system: + -Version 3 used mixed indicies for inputs and outputs, eg: + Available Midi Devices: + ----------------------- + [0] "IAC Driver - Bus 1" [Input] + [1] "IAC Driver - Bus 1" [Output] + [2] "Real Time Sequencer" [Input/Output] + [3] "Java Sound Synthesizer" [Output] + + -Version 4 now uses separate indicies for inputs and outputs, eg: + Available MIDI Devices: + ----------Input---------- + [0] "IAC Driver - Bus 1" + [1] "Real Time Sequencer" + ----------Output---------- + [0] "IAC Driver - Bus 1" + [1] "Real Time Sequencer" + [2] "Java Sound Synthesizer" + -The static method list() has been changed as per the new indexing system (and will also show unavailable devices) + -The static method returnList() has been replaced by the static methods availableInputs() and availableOutputs() + + New Features: + -Added overrides to Object methods for clone(), equals(Object obj), hashCode() and toString() + -Added attachedInputs() and attachedOutputs() methods. Theses methods return an array of the inputs/output currently attached to a given instance of the MidiBus object. + -Added removeInput(int device_num), removeInput(String device_name), removeOutput(int device_num) and removeOutput(String device_name). Theses methods allow the selective removal of attached inputs and outputs. + -Added static method unavailableDevices() which lists any devices that are detected but appear to be unavailable. (As per bug fix) + -Added new overloads to sendMessage(): + -sendMessage(byte[] data). Attempts to send an arbitrary array of bytes as a MIDI message. This method supports System Exclusive messages and Meta Messages, including messages with more than 2 data bytes. + -sendMessage(MidiMessage message). Attempts to send a MidiMessage object. + -sendMessage(int status). Attempts to send a message with only a status byte. + -sendMessage(int status, int data). Attempts to send a message with only a status byte and one data byte. diff --git a/libraries/themidibus/GNUGeneralPublicLicense.txt b/libraries/themidibus/GNUGeneralPublicLicense.txt new file mode 100644 index 0000000..42ecfd4 --- /dev/null +++ b/libraries/themidibus/GNUGeneralPublicLicense.txt @@ -0,0 +1,486 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includesded), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +tse explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise opyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily use for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, less of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights hae been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore,overed work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, throughipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parre a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to anyringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement d be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to lial Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is giy the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +ay consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/libraries/themidibus/INSTALL.txt b/libraries/themidibus/INSTALL.txt new file mode 100644 index 0000000..f38e81f --- /dev/null +++ b/libraries/themidibus/INSTALL.txt @@ -0,0 +1,7 @@ +The recommended way to install the MidiBus is the [Processing Library Manager](http://wiki.processing.org/w/How_to_Install_a_Contributed_Library). This way Processing will automatically notify you when a new version is available. + +If you wish to install the MidiBus manually you can simply drag this folder into your libraries folder. + +For Processing 1.0+, your libraries folder is located in your Processing sketch folder. + +Otherwise, if you're still using Processing BETA, your libraries folder can be found in same folder as Processing itself. \ No newline at end of file diff --git a/libraries/themidibus/README.md b/libraries/themidibus/README.md new file mode 100644 index 0000000..220dad5 --- /dev/null +++ b/libraries/themidibus/README.md @@ -0,0 +1,38 @@ +# The MidiBus + +The MidiBus is a MIDI library for Processing. It provides a quick and simple way to access and interact with installed MIDI system resources. The MidiBus is aimed primarily at real time MIDI applications. The focus is on strong MIDI I/O capabilities and keeping frills to a minimum (e.g. no built in sequencer, file read/write, MIDI recording/playback). + +## Download and Install (Stable) + +The recommended way to install the MidiBus is the [Processing Library Manager](http://wiki.processing.org/w/How_to_Install_a_Contributed_Library). This way Processing will automatically notify you when a new version is available. + +If you wish to install the MidiBus manually you can get the latest stable build including binaries and docs [via direct downloadd](http://smallbutdigital.com/releases/themidibus/themidibus-latest.zip). + +## Download and Install (Latest) + +The latest version can easily be cloned directly from github via + + git clone https://github.com/sparks/themidibus.git /your/processing/libraries/ + +### Compiling and Generating JavaDocs + +If you clone the latest version you will need to compile the library and generate the JavaDocs. This requires ``javac`` and ``ant``. + +To compile run ``ant`` + +To generate the JavaDocs run ``ant doc`` + +## About +Before you get started, it is important to understand that the MidiBus offers little functionality that isn't available from Java's native [javax.sound.midi package](http://docs.oracle.com/javase/6/docs/api/javax/sound/midi/package-summary.html). Anyone interested in working with MIDI in Java should take the time to read the documentation for the [javax.sound.midi package](http://docs.oracle.com/javase/6/docs/api/javax/sound/midi/package-summary.html). It offers a more full featured and flexible alternative to this package, although it does do so at the cost of added complexity. In addition, it may be worthwhile to skim [the "official" Java Tutorial for the javax.sound.* packages](http://docs.oracle.com/javase/tutorial/sound/index.html). + +## Getting Started + +The MidiBus is very straight forwards to use. A good place to start is the included Basic.pde example. From there you can look at the JavaDocs either [online](http://smallbutdigital.com/themidibus/themidibus/package-summary.html) or bundled with your library in the "reference" subdirectory. The JavaDocs are a comprehensive reference of all the MidiBus' available functionality. There are also a few advanced examples which can (hopefully) help answer the most common questions: how to work with multiple input/output devices, how to send uncommon MIDI messages and how to receive uncommon MIDI messages. + +## Using Alternate MIDI Subsytem + +The Apple MIDI subsystem has a number of problems. Most notably it doesn't seem to support MIDI messages with status >= 0xF0 such as SysEx messages. You can use [MMJ](http://www.humatic.de/htools/mmj.htm) as an alternate subsystem. To do so, download mmj and add both `mmj.jar` and `libmmj.jnilib` to the midibus `library` subdirectory. You must also disable timestamps in your MidiBus instance otherwise MMJ won't work properly. You can do so by calling `mybus.sendTimestamp(false)` + +## Liscence + +GPL3 \ No newline at end of file diff --git a/libraries/themidibus/bin/themidibus/ControlChange.class b/libraries/themidibus/bin/themidibus/ControlChange.class new file mode 100644 index 0000000000000000000000000000000000000000..4669b32e2f683204baef047001e43d62e764aff8 GIT binary patch literal 1396 zcmaJnvCl*7WrN|2{$C%WRQv*x@8$A z1IsgrRdl3 zX@mKSRk0VSNaXYREjQ2|iDI5}N7Ahl4PpaT~)GO zbHB(ilt>=jl%aRc){DXu`ks{-HQ#Tt7!-)>Yy~3tZw6n=aWQd9>9OvP- ziZP6<6C!4_m~Ol(2%nI~}4V}{W~e-M_l{P`G8dGi6vjOK#&3BnE){KJXvbkV0r zyV6CUp6pJSe0r=aUGnMlq&#u&$r>*H zQ~iQe2WVW>Qtu!HcTztf1a`DGMo7iTTi&F;A+nODgYd(=;VaaL)QEl~Q6u?{%nwAT ead8TDinC3STgJe(^g)&cbq@m)&Zugy3j6^A)Dc4f literal 0 HcmV?d00001 diff --git a/libraries/themidibus/bin/themidibus/MidiBus$InputDeviceContainer.class b/libraries/themidibus/bin/themidibus/MidiBus$InputDeviceContainer.class new file mode 100644 index 0000000000000000000000000000000000000000..8a108ae1cb575a77f20f229b1aea7b91f2c78f8b GIT binary patch literal 926 zcmah|O>fgc5Pcgvbv|4OA)!D@F(FXLDY#H14nZ6Umq=}qXvKlsCRvg#iBsZr#9!%u z=mm)u!2z{beiUNX4zyCLa`5cz?3>wnZ`Qwl|M&@D0~=YSaVLi?R`R$DM{n<0xSvBF z4{~^jRc%}gbp}%gAI26u^4jDv*zF(?lh%-jp$HkOn|pl9Kl|Z03VQxX_N2c>=Czp0 zuBhphCPQ9Lco2@HQewieGM}=0c24ljM0ACmYHVd5`*wCnzy&psVQrnEw5bL{U*3tr z`2JT>sLx->K&qDv&)kau^R>@fZ`R)t<<__-sEqg&@gb2dyK#y?gc3=X~1EWKcpKGKgYa217ky@n!CC}^c= zZ_ro94KOT`=O7hFN?zj#%=?Cvx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gl8{_R*GoMIjrZdX+qctyHXO^p+%<|%pdT8VLOLg(l#0RvJ z%1`0)_~o~u8qViuD{yGz$7yr|)uofoHApregj+W7hxdI5c#)e7@VA|BR{b1>mJ`1+ zn*7&ON5~`|PX51`#BVxnCcA7&o-w#2gK0@3v)Gssq7vXMIR!Y0rltirg7VS=Y=WGS za?Bex4<30Hycquu!|il_uFgzx0lN7&1*^g3FY!GAtpM&Azrd7I)W1SK3-zy2j}l4x HE&2WrmTVUd literal 0 HcmV?d00001 diff --git a/libraries/themidibus/bin/themidibus/MidiListener.class b/libraries/themidibus/bin/themidibus/MidiListener.class new file mode 100644 index 0000000000000000000000000000000000000000..3fb31f212e892ab119f7a01128a7b8f8f3a31e8c GIT binary patch literal 75 zcmX^0Z`VEs1_omWR(1wvb_Nzk2Jw=N)ZEOJ%%sv{eP1B$lUZDnnwMI{$RLoFSeB@t YlbDyT@1K;Fnq0!h$iT?J1k?@&04*O9-~a#s literal 0 HcmV?d00001 diff --git a/libraries/themidibus/bin/themidibus/Note.class b/libraries/themidibus/bin/themidibus/Note.class new file mode 100644 index 0000000000000000000000000000000000000000..a06021140a33057654b3604682abee6de6909e7b GIT binary patch literal 2106 zcmaJ=TT>fl7=E@%cE5zBh2_w4s$i`R8z?;}DqxjEK`78_keXt}C9Dt#NgxXzZ~X=K z#w)M%3THe4Gdgv=(i#7O|D~fo@9qY}!II%Uzt4O6_Rqh6{uRJYd=~pB{7ax6cN4I2 zFHY%AA#Vvu3z-x0wvc%t_YJ(0fQfqw8Q~8kc|qY_Q64J1r?4pE`wEWmC55cQvVtoG zJ}|IiU{xWfu%@uCkXP7HC@2&aN(!3_TMA_b&%m|@RmyqU)fuOxplD1%>@f!0j@xK z#b9?VkoKJHI(IwgEahEZg|oVw+fJU_YD!jN-(6aBv)*9$10IhEL)m<|8bZ#S=*OUt zSrfguYNAibH6hn=!{j?7c>yn)NTEl=`QtYn+0Nyc-7Owy!Nd+eG%Ks!Z3wl5k`*S1iRtpoKndxENkek-dy-hPaZ0qnh&_0=dapz zkWuZPdYW6U@FnG)GEdfU=0Ld&O`Z}xAHm9<#S%l=R6v@ z#f*NuMEWwd7UD$7Ywfo7jz}Xk?EsPQX%OIkyb^}BGAu^hSqW>3o`@T$f-@Kwz%@r( z^doSCVc1PX2nbxU4-mE6_7Jn%_n_Mydob*#=;wP-c5`eGal6IXL!#2p5MB)dES%vF zOp)Y@zZbVce?7TIf6V>~v0Vx>&TFTq>y`ArQ`7ZI`s+`34lhEa zs1N&;C8=-2^86Y@_g{P%lK=P@n3)6AT4(oh&fZ5InN=?`ce@YEY6xUq^}v z^Lzm~V5KluSSTzBo@p${hOpU1w&a`6b$aiDvuuz13qkd~CGsj=bQw1Q%04()*>t GObEVO8$8Vb literal 0 HcmV?d00001 diff --git a/libraries/themidibus/bin/themidibus/RawMidiListener.class b/libraries/themidibus/bin/themidibus/RawMidiListener.class new file mode 100644 index 0000000000000000000000000000000000000000..ecdf6481fb6b58a5c2a9e082cd20915fa7e851aa GIT binary patch literal 142 zcmX^0Z`VEs1_omWPId-1b_RBK1`b9BzM{l(-^`Ru-_+vb#Pn1~23Cz|C(STM2C0&a z)LfuMQfaY%5JZhnW^qYsUTP5|gFsedS)zVUVqUtwe^ORzatR}YIFfphfiT5vj0}tn UOhC*Gw40HIk%5JQ706-$01bd7VgLXD literal 0 HcmV?d00001 diff --git a/libraries/themidibus/bin/themidibus/SimpleMidiListener.class b/libraries/themidibus/bin/themidibus/SimpleMidiListener.class new file mode 100644 index 0000000000000000000000000000000000000000..598f40ab0bf80bd5fe44e20171b8595aff7c43b0 GIT binary patch literal 183 zcmX^0Z`VEs1_omWZgvI^b_Py%1};Vhw!Hk3RR266L&MY4Q!|W_fgLQ8md3~+ker`a zQk0*QlUn4Qk(igB%E%yFl98I5nUa}QTC5+OnOl&P>I>xgWEPjC=A{+^wPYohCFl|Pzy!q1Ku0mNFfy<(ure?JX*MX$4x$+t01zB3TmS$7 literal 0 HcmV?d00001 diff --git a/libraries/themidibus/bin/themidibus/StandardMidiListener.class b/libraries/themidibus/bin/themidibus/StandardMidiListener.class new file mode 100644 index 0000000000000000000000000000000000000000..12eb50c377056d95ee2f0ce72896c71579dfd519 GIT binary patch literal 173 zcmX^0Z`VEs1_omWPId-1b_RBK1`b9B?%d3jOyAVv;>7e+Mg}DfpRB~P#0vf5{L;J> zeUO~KFG7K}mu46vgM3LwDo7@&v{*m5Brz`~u_y(k$S1S7BsDL!h><}6WQcxFVqUtw me^ORzatR}YIFcr0#cYfWj0{Xb%nWoIBMTz~3j-^V#Q*@LtT0Ug literal 0 HcmV?d00001 diff --git a/libraries/themidibus/bin/themidibus/package-info.class b/libraries/themidibus/bin/themidibus/package-info.class new file mode 100644 index 0000000000000000000000000000000000000000..f9d5b5c7cb54b4a9afd851669dc3741ca0650a54 GIT binary patch literal 116 zcmX^0Z`VEs1_nb0c6J6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libraries/themidibus/examples/AdvancedMIDIMessageIO/AdvancedMIDIMessageIO.pde b/libraries/themidibus/examples/AdvancedMIDIMessageIO/AdvancedMIDIMessageIO.pde new file mode 100644 index 0000000..144326a --- /dev/null +++ b/libraries/themidibus/examples/AdvancedMIDIMessageIO/AdvancedMIDIMessageIO.pde @@ -0,0 +1,102 @@ +import themidibus.*; //Import the library +import javax.sound.midi.MidiMessage; //Import the MidiMessage classes http://java.sun.com/j2se/1.5.0/docs/api/javax/sound/midi/MidiMessage.html +import javax.sound.midi.SysexMessage; +import javax.sound.midi.ShortMessage; + +MidiBus myBus; // The MidiBus + +void setup() { + size(400, 400); + background(0); + + MidiBus.list(); // List all available Midi devices on STDOUT. This will show each device's index and name. + myBus = new MidiBus(this, 0, 0); // Create a new MidiBus object + + // On mac you will need to use MMJ since Apple's MIDI subsystem doesn't properly support SysEx. + // However MMJ doesn't support sending timestamps so you have to turn off timestamps. + // myBus.sendTimestamps(false); +} + +void draw() { + int channel = 0; + int pitch = 64; + int velocity = 127; + + myBus.sendNoteOn(channel, pitch, velocity); // Send a Midi noteOn + delay(200); + myBus.sendNoteOff(channel, pitch, velocity); // Send a Midi nodeOff + delay(100); + + //Or for something different we could send a custom Midi message ... + + int status_byte = 0xA0; // For instance let us send aftertouch + int channel_byte = 0; // On channel 0 again + int first_byte = 64; // The same note; + int second_byte = 80; // But with less velocity + + myBus.sendMessage(status_byte, channel_byte, first_byte, second_byte); + + //Or we could even send a variable length sysex message + //IMPORTANT: On mac you will have to use the MMJ MIDI subsystem to be able to send SysexMessages. Consult README.md for more information + + myBus.sendMessage( + new byte[] { + (byte)0xF0, (byte)0x1, (byte)0x2, (byte)0x3, (byte)0x4, (byte)0xF7 + } + ); + //We could also do the same thing this way ... + + try { //All the methods of SysexMessage, ShortMessage, etc, require try catch blocks + SysexMessage message = new SysexMessage(); + message.setMessage( + 0xF0, + new byte[] { + (byte)0x5, (byte)0x6, (byte)0x7, (byte)0x8, (byte)0xF7 + }, + 5 + ); + myBus.sendMessage(message); + } catch(Exception e) { + + } + + delay(2000); +} + +// Notice all bytes below are converted to integeres using the following system: +// int i = (int)(byte & 0xFF) +// This properly convertes an unsigned byte (MIDI uses unsigned bytes) to a signed int +// Because java only supports signed bytes, you will get incorrect values if you don't do so + +void rawMidi(byte[] data) { // You can also use rawMidi(byte[] data, String bus_name) + // Receive some raw data + // data[0] will be the status byte + // data[1] and data[2] will contain the parameter of the message (e.g. pitch and volume for noteOn noteOff) + println(); + println("Raw Midi Data:"); + println("--------"); + println("Status Byte/MIDI Command:"+(int)(data[0] & 0xFF)); + // N.B. In some cases (noteOn, noteOff, controllerChange, etc) the first half of the status byte is the command and the second half if the channel + // In these cases (data[0] & 0xF0) gives you the command and (data[0] & 0x0F) gives you the channel + for (int i = 1;i < data.length;i++) { + println("Param "+(i+1)+": "+(int)(data[i] & 0xFF)); + } +} + +void midiMessage(MidiMessage message) { // You can also use midiMessage(MidiMessage message, long timestamp, String bus_name) + // Receive a MidiMessage + // MidiMessage is an abstract class, the actual passed object will be either javax.sound.midi.MetaMessage, javax.sound.midi.ShortMessage, javax.sound.midi.SysexMessage. + // Check it out here http://java.sun.com/j2se/1.5.0/docs/api/javax/sound/midi/package-summary.html + println(); + println("MidiMessage Data:"); + println("--------"); + println("Status Byte/MIDI Command:"+message.getStatus()); + for (int i = 1;i < message.getMessage().length;i++) { + println("Param "+(i+1)+": "+(int)(message.getMessage()[i] & 0xFF)); + } +} + +void delay(int time) { + int current = millis(); + while (millis () < current+time) Thread.yield(); +} diff --git a/libraries/themidibus/examples/Basic/Basic.pde b/libraries/themidibus/examples/Basic/Basic.pde new file mode 100644 index 0000000..30a5bed --- /dev/null +++ b/libraries/themidibus/examples/Basic/Basic.pde @@ -0,0 +1,76 @@ +import themidibus.*; //Import the library + +MidiBus myBus; // The MidiBus + +void setup() { + size(400, 400); + background(0); + + MidiBus.list(); // List all available Midi devices on STDOUT. This will show each device's index and name. + + // Either you can + // Parent In Out + // | | | + //myBus = new MidiBus(this, 0, 1); // Create a new MidiBus using the device index to select the Midi input and output devices respectively. + + // or you can ... + // Parent In Out + // | | | + //myBus = new MidiBus(this, "IncomingDeviceName", "OutgoingDeviceName"); // Create a new MidiBus using the device names to select the Midi input and output devices respectively. + + // or for testing you could ... + // Parent In Out + // | | | + myBus = new MidiBus(this, -1, "Java Sound Synthesizer"); // Create a new MidiBus with no input device and the default Java Sound Synthesizer as the output device. +} + +void draw() { + int channel = 0; + int pitch = 64; + int velocity = 127; + + myBus.sendNoteOn(channel, pitch, velocity); // Send a Midi noteOn + delay(200); + myBus.sendNoteOff(channel, pitch, velocity); // Send a Midi nodeOff + + int number = 0; + int value = 90; + + myBus.sendControllerChange(channel, number, value); // Send a controllerChange + delay(2000); +} + +void noteOn(int channel, int pitch, int velocity) { + // Receive a noteOn + println(); + println("Note On:"); + println("--------"); + println("Channel:"+channel); + println("Pitch:"+pitch); + println("Velocity:"+velocity); +} + +void noteOff(int channel, int pitch, int velocity) { + // Receive a noteOff + println(); + println("Note Off:"); + println("--------"); + println("Channel:"+channel); + println("Pitch:"+pitch); + println("Velocity:"+velocity); +} + +void controllerChange(int channel, int number, int value) { + // Receive a controllerChange + println(); + println("Controller Change:"); + println("--------"); + println("Channel:"+channel); + println("Number:"+number); + println("Value:"+value); +} + +void delay(int time) { + int current = millis(); + while (millis () < current+time) Thread.yield(); +} diff --git a/libraries/themidibus/examples/BasicWithClasses/BasicWithClasses.pde b/libraries/themidibus/examples/BasicWithClasses/BasicWithClasses.pde new file mode 100644 index 0000000..99429e0 --- /dev/null +++ b/libraries/themidibus/examples/BasicWithClasses/BasicWithClasses.pde @@ -0,0 +1,78 @@ +import themidibus.*; //Import the library + +MidiBus myBus; // The MidiBus + +void setup() { + size(400, 400); + background(0); + + MidiBus.list(); // List all available Midi devices on STDOUT. This will show each device's index and name. + + // Either you can + // Parent In Out + // | | | + //myBus = new MidiBus(this, 0, 1); // Create a new MidiBus using the device index to select the Midi input and output devices respectively. + + // or you can ... + // Parent In Out + // | | | + //myBus = new MidiBus(this, "IncomingDeviceName", "OutgoingDeviceName"); // Create a new MidiBus using the device names to select the Midi input and output devices respectively. + + // or for testing you could ... + // Parent In Out + // | | | + myBus = new MidiBus(this, -1, "Java Sound Synthesizer"); // Create a new MidiBus with no input device and the default Java Sound Synthesizer as the output device. +} + +void draw() { + int channel = 0; + int pitch = 64; + int velocity = 127; + Note note = new Note(channel, pitch, velocity); + + myBus.sendNoteOn(note); // Send a Midi noteOn + delay(200); + myBus.sendNoteOff(note); // Send a Midi nodeOff + + int number = 0; + int value = 90; + ControlChange change = new ControlChange(channel, number, velocity); + + myBus.sendControllerChange(change); // Send a controllerChange + delay(2000); +} + +void noteOn(Note note) { + // Receive a noteOn + println(); + println("Note On:"); + println("--------"); + println("Channel:"+note.channel()); + println("Pitch:"+note.pitch()); + println("Velocity:"+note.velocity()); +} + +void noteOff(Note note) { + // Receive a noteOff + println(); + println("Note Off:"); + println("--------"); + println("Channel:"+note.channel()); + println("Pitch:"+note.pitch()); + println("Velocity:"+note.velocity()); +} + +void controllerChange(ControlChange change) { + // Receive a controllerChange + println(); + println("Controller Change:"); + println("--------"); + println("Channel:"+change.channel()); + println("Number:"+change.number()); + println("Value:"+change.value()); +} + +void delay(int time) { + int current = millis(); + while (millis () < current+time) Thread.yield(); +} diff --git a/libraries/themidibus/examples/MultipleBuses/MultipleBuses.pde b/libraries/themidibus/examples/MultipleBuses/MultipleBuses.pde new file mode 100644 index 0000000..93f2d9f --- /dev/null +++ b/libraries/themidibus/examples/MultipleBuses/MultipleBuses.pde @@ -0,0 +1,115 @@ +import themidibus.*; //Import the library + +MidiBus busA; //The first MidiBus +MidiBus busB; //The second MidiBus + +void setup() { + size(400, 400); + background(0); + + MidiBus.list(); //List all available Midi devices. This will show each device's index and name. + + //This is a different way of listing the available Midi devices. + println(); + println("Available MIDI Devices:"); + + System.out.println("----------Input (from availableInputs())----------"); + String[] available_inputs = MidiBus.availableInputs(); //Returns an array of available input devices + for (int i = 0;i < available_inputs.length;i++) System.out.println("["+i+"] \""+available_inputs[i]+"\""); + + System.out.println("----------Output (from availableOutputs())----------"); + String[] available_outputs = MidiBus.availableOutputs(); //Returns an array of available output devices + for (int i = 0;i < available_outputs.length;i++) System.out.println("["+i+"] \""+available_outputs[i]+"\""); + + System.out.println("----------Unavailable (from unavailableDevices())----------"); + String[] unavailable = MidiBus.unavailableDevices(); //Returns an array of unavailable devices + for (int i = 0;i < unavailable.length;i++) System.out.println("["+i+"] \""+unavailable[i]+"\""); + + busA = new MidiBus(this, "IncomingA", "OutgoingA", "busA"); //Create a first new MidiBus attached to the IncommingA Midi input device and the OutgoingA Midi output device. We will name it busA. + busB = new MidiBus(this, "IncomingB", "OutgoingB", "busB"); //Create a second new MidiBus attached to the IncommingB Midi input device and the OutgoingB Midi output device. We will name it busB. + + busA.addOutput("OutgoingC"); //Add a new output device to busA called OutgoingC + busB.addInput("IncomingC"); //Add a new input device to busB called IncommingC + + //It is also possible to check what devices are currently attached as inputs or outputs on a bus + + println(); + println("Inputs on busA"); + println(busA.attachedInputs()); //Print the devices attached as inputs to busA + println(); + println("Outputs on busB"); + println(busB.attachedOutputs()); //Prints the devices attached as outpus to busB +} + +void draw() { + int channel = 0; + int pitch = 64; + int velocity = 127; + + busA.sendNoteOn(channel, pitch, velocity); //Send a noteOn to OutgoingA and OutgoingC through busA + delay(200); + busB.sendNoteOn(channel, pitch, velocity); //Send a noteOn to OutgoingB through busB + delay(100); + busA.sendNoteOff(channel, pitch, velocity); //Send a noteOff to OutgoingA and OutgoingC through busA + busB.sendNoteOff(channel, pitch, velocity); //Send a noteOff to OutgoingB through busB + + int number = 0; + int value = 90; + + busA.sendControllerChange(channel, number, value); //Send a controllerChange to OutgoingA and OutgoingC through busA + busB.sendControllerChange(channel, number+10, value+10); //Send a controllerChange to OutgoingB through busB + delay(2000); +} + +void noteOn(int channel, int pitch, int velocity, long timestamp, String bus_name) { + println(); + println("Note On:"); + println("--------"); + println("Channel:"+channel); + println("Pitch:"+pitch); + println("Velocity:"+velocity); + println("Timestamp:"+timestamp); + println("Recieved on Bus:"+bus_name); + if (bus_name == "busA") { + println("This came from IncomingA"); + } else if (bus_name == "busB") { + println("This came from IncomingB or IncomingC"); + } +} + +void noteOff(int channel, int pitch, int velocity, long timestamp, String bus_name) { + println(); + println("Note Off:"); + println("--------"); + println("Channel:"+channel); + println("Pitch:"+pitch); + println("Velocity:"+velocity); + println("Timestamp:"+timestamp); + println("Recieved on Bus:"+bus_name); + if (bus_name == "busA") { + println("This came from IncomingA"); + } else if (bus_name == "busB") { + println("This came from IncomingB or IncomingC"); + } +} + +void controllerChange(int channel, int number, int value, long timestamp, String bus_name) { + println(); + println("Controller Change:"); + println("--------"); + println("Channel:"+channel); + println("Number:"+number); + println("Value:"+value); + println("Timestamp:"+timestamp); + println("Recieved on Bus:"+bus_name); + if (bus_name == "busA") { + println("This came from IncomingA"); + } else if (bus_name == "busB") { + println("This came from IncomingB or IncomingC"); + } +} + +void delay(int time) { + int current = millis(); + while (millis () < current+time) Thread.yield(); +} diff --git a/libraries/themidibus/library.properties b/libraries/themidibus/library.properties new file mode 100644 index 0000000..6ad3267 --- /dev/null +++ b/libraries/themidibus/library.properties @@ -0,0 +1,11 @@ +name=The MidiBus +category=Data +authors=[Severin Smith](http://www.smallbutdigital.com/) +url=http://www.smallbutdigital.com/themidibus.php +sentence=The MidiBus is a minimal MIDI library for Processing, no frills, no limitations. +paragraph=The MidiBus is a MIDI library for Processing. It provides a quick and simple way to access and interact with installed MIDI system resources. The MidiBus is aimed primarily at real time MIDI applications. The focus is on strong MIDI I/O capabilities and keeping frills to a minimum (e.g. no built in sequencer, file read/write, MIDI recording/playback). +version=8 +prettyVersion=8 +lastUpdated=0 +minRevision=0 +maxRevision=0 diff --git a/libraries/themidibus/library/themidibus.jar b/libraries/themidibus/library/themidibus.jar new file mode 100644 index 0000000000000000000000000000000000000000..c9bd69a7d24bc084583ebac95b0c79f23b1d80c7 GIT binary patch literal 13167 zcmaKS1ymf{(lx=|-Q9w_6C_CR!QGwUuEE`5a0o5|g1Zmy65KsNAUFgj@N>WWzjtr) z?t49}de*FU&hDzNI=jwvZ)G_sXhaAIcnAm*M+Rw#za0n=&=3l5)x?-(6{T38Mj;@S z|Nl^U2;!Ha4O4*6IxoX5Ukv-j{ykJdOi@;k~azKTY?jK-Av@WAcW>e>2lUm*U^m%n)pf%Njj)yn+6wVAbvn+xl&PNR1jX0JoO z41j@vApLcqgoC}SvxA+4m9f30Ig6>Cv5SizK+XYE1z)%s`KqV<{ZTMw10au0d1k?~ zTs@lAMi+0M)+UC)NW7fQh~NQft<7b3G<6ULNdZxTi@lobf|vW)&z5lz4uU2WywSTs?p#aH;oXtGt_LzW z+kwX*-8)sIcfie0RY}veKE z+_Q=366`@6oG6ZR3OFTp<7~CFjJC2267Y3DO88(S*sFEWIAtCfgogjmDfT zHf=eyo_Kn+eVw7wKPr$`axIl36<$eY@p64ATDzgE3!B^YmDn2LiG!X;^=_R;je~v6 z*4cCGR+U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&miNCV{(0%&RqX$oS`@hT>%@Q1wEvFvyYTlftRFAhx4${@ zN74On8SwAWzY9YDf);}PN9f<=p}*t(F3S504<6wk@&1QI?|1Cq6^1lr5T_T`Vs*&jMmi2nypEKxN8 literal 0 HcmV?d00001 diff --git a/libraries/themidibus/reference/allclasses-frame.html b/libraries/themidibus/reference/allclasses-frame.html new file mode 100644 index 0000000..f75f5ad --- /dev/null +++ b/libraries/themidibus/reference/allclasses-frame.html @@ -0,0 +1,26 @@ + + + + + +All Classes + + + + +

All Classes

+ + + diff --git a/libraries/themidibus/reference/allclasses-noframe.html b/libraries/themidibus/reference/allclasses-noframe.html new file mode 100644 index 0000000..0ff8f53 --- /dev/null +++ b/libraries/themidibus/reference/allclasses-noframe.html @@ -0,0 +1,26 @@ + + + + + +All Classes + + + + +

All Classes

+ + + diff --git a/libraries/themidibus/reference/constant-values.html b/libraries/themidibus/reference/constant-values.html new file mode 100644 index 0000000..7e2307b --- /dev/null +++ b/libraries/themidibus/reference/constant-values.html @@ -0,0 +1,111 @@ + + + + + +Constant Field Values + + + + + + + + + + +
+

Constant Field Values

+

Contents

+
+ + + + + + diff --git a/libraries/themidibus/reference/deprecated-list.html b/libraries/themidibus/reference/deprecated-list.html new file mode 100644 index 0000000..b4bd0d6 --- /dev/null +++ b/libraries/themidibus/reference/deprecated-list.html @@ -0,0 +1,111 @@ + + + + + +Deprecated List + + + + + + + +
+ + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + +
+ + + + diff --git a/libraries/themidibus/reference/help-doc.html b/libraries/themidibus/reference/help-doc.html new file mode 100644 index 0000000..2239e9a --- /dev/null +++ b/libraries/themidibus/reference/help-doc.html @@ -0,0 +1,208 @@ + + + + + +API Help + + + + + + + +
+ + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    +
      +
    • Interfaces (italic)
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
  • +
  • +

    Class/Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class inheritance diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class/interface declaration
    • +
    • Class/interface description
    • +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
      +
    • Field Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
  • +
  • +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type declaration
    • +
    • Annotation Type description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
  • +
  • +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum declaration
    • +
    • Enum description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
  • +
  • +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • +
    +
  • +
  • +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
  • +
  • +

    Index

    +

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    +
  • +
  • +

    Prev/Next

    +

    These links take you to the next or previous class, interface, package, or related page.

    +
  • +
  • +

    Frames/No Frames

    +

    These links show and hide the HTML frames. All pages are available with or without frames.

    +
  • +
  • +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
  • +
  • +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
  • +
  • +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
  • +
+This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + +
+ + + + diff --git a/libraries/themidibus/reference/index-all.html b/libraries/themidibus/reference/index-all.html new file mode 100644 index 0000000..ea2a526 --- /dev/null +++ b/libraries/themidibus/reference/index-all.html @@ -0,0 +1,700 @@ + + + + + +Index + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H L M N O P R S T U V  + + +

A

+
+
addInput(int) - Method in class themidibus.MidiBus
+
+
Adds a new MIDI input device specified by the index device_num.
+
+
addInput(String) - Method in class themidibus.MidiBus
+
+
Adds a new MIDI input device specified by the name device_name.
+
+
addMidiListener(MidiListener) - Method in class themidibus.MidiBus
+
+
Adds a listener who will be notified each time a new MIDI message is received from a MIDI input device.
+
+
addOutput(int) - Method in class themidibus.MidiBus
+
+
Adds a new MIDI output device specified by the index device_num.
+
+
addOutput(String) - Method in class themidibus.MidiBus
+
+
Adds a new MIDI output device specified by the name device_name.
+
+
attachedInputs() - Method in class themidibus.MidiBus
+
+
Returns the names of all the attached input devices.
+
+
attachedOutputs() - Method in class themidibus.MidiBus
+
+
Returns the names of all the attached output devices.
+
+
availableInputs() - Static method in class themidibus.MidiBus
+
+
Returns the names of all the available input devices.
+
+
availableOutputs() - Static method in class themidibus.MidiBus
+
+
Returns the names of all the available output devices.
+
+
+ + + +

B

+
+
bus_name - Variable in class themidibus.ControlChange
+
 
+
bus_name - Variable in class themidibus.Note
+
 
+
+ + + +

C

+
+
channel - Variable in class themidibus.ControlChange
+
 
+
channel() - Method in class themidibus.ControlChange
+
+
Return the channel of the ControlChange
+
+
channel - Variable in class themidibus.Note
+
 
+
channel() - Method in class themidibus.Note
+
+
Return the channel of the Note
+
+
clearAll() - Method in class themidibus.MidiBus
+
+
Closes, clears and disposes of all input and output related Transmitters and Receivers.
+
+
clearInputs() - Method in class themidibus.MidiBus
+
+
Closes, clears and disposes of all input related Transmitters and Receivers.
+
+
clearOutputs() - Method in class themidibus.MidiBus
+
+
Closes, clears and disposes of all output related Receivers.
+
+
clone() - Method in class themidibus.MidiBus
+
+
Creates and returns a copy of this object.
+
+
close() - Method in class themidibus.MidiBus
+
+
Closes this MidiBus and all connections it has with other MIDI devices.
+
+
ControlChange - Class in themidibus
+
+
The ControlChange class represents a change in value from a controller.
+
+
ControlChange(int, int, int) - Constructor for class themidibus.ControlChange
+
+
Constructs a ControlChange object
+
+
ControlChange(int, int, int, long, String) - Constructor for class themidibus.ControlChange
+
+
Constructs a ControlChange object
+
+
controllerChange(ControlChange) - Method in interface themidibus.ObjectMidiListener
+
+
Objects notifying this ObjectMidiListener of a new ControllerChange events call this method.
+
+
controllerChange(int, int, int) - Method in class themidibus.PApplet
+
+
Is passed the channel, controller number and contoller value associated with every new ContollerChange MIDI message recieved by a MidiBus attached to this applet.
+
+
controllerChange(int, int, int, long, String) - Method in class themidibus.PApplet
+
+
Is passed the channel, pitch and velocity associated with every new NoteOff MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
+
+
controllerChange(ControlChange) - Method in class themidibus.PApplet
+
+
Is passed a ControlChange object representing controlChange event
+
+
controllerChange(int, int, int) - Method in interface themidibus.SimpleMidiListener
+
+
Objects notifying this SimpleMidiListener of a new ControllerChange MIDI message call this method.
+
+
+ + + +

D

+
+
dispose() - Method in class themidibus.MidiBus
+
+
Closes this MidiBus and all connections it has with other MIDI devices.
+
+
+ + + +

E

+
+
equals(Object) - Method in class themidibus.ControlChange
+
+
Check if all fields are equal.
+
+
equals(Object) - Method in class themidibus.MidiBus
+
+
Indicates whether some other object is "equal to" this one.
+
+
equals(Object) - Method in class themidibus.Note
+
+
Check if all fields are equal.
+
+
+ + + +

F

+
+
finalize() - Method in class themidibus.MidiBus
+
+
Override the finalize() method from java.lang.Object.
+
+
findMidiDevices() - Static method in class themidibus.MidiBus
+
+
Rescan for Midi Devices.
+
+
+ + + +

G

+
+
generateBusName() - Method in class themidibus.MidiBus
+
+
Generate a name for this MidiBus instance.
+
+
getBusName() - Method in class themidibus.MidiBus
+
+
Returns the name of this MidiBus.
+
+
+ + + +

H

+
+
hashCode() - Method in class themidibus.MidiBus
+
+
Returns a hash code value for the object.
+
+
+ + + +

L

+
+
list() - Static method in class themidibus.MidiBus
+
+
List all installed MIDI devices.
+
+
+ + + +

M

+
+
MidiBus - Class in themidibus
+
+
The MidiBus class provides a simple way to send and receive MIDI within Processing sketches.
+
+
MidiBus() - Constructor for class themidibus.MidiBus
+
+
Constructs a new Midibus.
+
+
MidiBus(Object) - Constructor for class themidibus.MidiBus
+
+
Constructs a new MidiBus and registers the specified parent (PApplet or other) for callbacks.
+
+
MidiBus(Object, String) - Constructor for class themidibus.MidiBus
+
+
Constructs a new MidiBus with the specified bus_name and registers the specified parent (PApplet or other) for callbacks.
+
+
MidiBus(Object, int, int) - Constructor for class themidibus.MidiBus
+
+
Constructs a new MidiBus and registers the specified parent (PApplet or other) for callbacks.
+
+
MidiBus(Object, int, int, String) - Constructor for class themidibus.MidiBus
+
+
Constructs a new MidiBus with the specified bus_name and registers the specified parent (PApplet or other) for callbacks.
+
+
MidiBus(Object, String, String) - Constructor for class themidibus.MidiBus
+
+
Constructs a new MidiBus and registers the specified parent (PApplet or other) for callbacks.
+
+
MidiBus(Object, String, String, String) - Constructor for class themidibus.MidiBus
+
+
Constructs a new MidiBus with the specified bus_name and registers the specified parent (PApplet or other) for callbacks.
+
+
MidiBus(Object, int, String) - Constructor for class themidibus.MidiBus
+
+
More flavors of constructor, similar to the others, but with mixed arguments
+
+
MidiBus(Object, int, String, String) - Constructor for class themidibus.MidiBus
+
+
More flavors of constructor, similar to the others, but with mixed arguments
+
+
MidiBus(Object, String, int) - Constructor for class themidibus.MidiBus
+
+
More flavors of constructor, similar to the others, but with mixed arguments
+
+
MidiBus(Object, String, int, String) - Constructor for class themidibus.MidiBus
+
+
More flavors of constructor, similar to the others, but with mixed arguments
+
+
MidiListener - Interface in themidibus
+
+
This is a placeholder interface which makes it easier to program and manipulate objects which implement subinterfaces of MidiListener like RawMidiListener, SimpleMidiListener or StandardMidiListener.
+
+
midiMessage(MidiMessage) - Method in class themidibus.PApplet
+
+
Is passed the raw MidiMessage associated with every new MIDI message recieved by a MidiBus attached to this applet.
+
+
midiMessage(MidiMessage, long, String) - Method in class themidibus.PApplet
+
+
Is passed the raw MidiMessage associated with every new MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
+
+
midiMessage(MidiMessage, long) - Method in interface themidibus.StandardMidiListener
+
+
Objects notifying this StandardMidiListener of a new MIDI message call this method and pass the MidiMessage
+
+
+ + + +

N

+
+
name() - Method in class themidibus.Note
+
+
Return the name of the note, e.g.
+
+
Note - Class in themidibus
+
+
The Note class represents a pressed or released key.
+
+
Note(int, int, int) - Constructor for class themidibus.Note
+
+
Constructs a Note object
+
+
Note(int, int, int, int) - Constructor for class themidibus.Note
+
+
Constructs a Note object
+
+
Note(int, int, int, long, String) - Constructor for class themidibus.Note
+
+
Constructs a Note object
+
+
Note(int, int, int, int, long, String) - Constructor for class themidibus.Note
+
+
Constructs a Note object
+
+
noteOff(Note) - Method in interface themidibus.ObjectMidiListener
+
+
Objects notifying this ObjectMidiListener of a new NoteOff events call this method.
+
+
noteOff(int, int, int) - Method in class themidibus.PApplet
+
+
Is passed the channel, pitch and velocity associated with every new NoteOff MIDI message recieved by a MidiBus attached to this applet.
+
+
noteOff(int, int, int, long, String) - Method in class themidibus.PApplet
+
+
Is passed the channel, pitch and velocity associated with every new NoteOff MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
+
+
noteOff(Note) - Method in class themidibus.PApplet
+
+
Is passed a Note object representing noteOff event
+
+
noteOff(int, int, int) - Method in interface themidibus.SimpleMidiListener
+
+
Objects notifying this SimpleMidiListener of a new NoteOff MIDI message call this method.
+
+
noteOn(Note) - Method in interface themidibus.ObjectMidiListener
+
+
Objects notifying this ObjectMidiListener of a new NoteOn events call this method.
+
+
noteOn(int, int, int) - Method in class themidibus.PApplet
+
+
Is passed the channel, pitch and velocity associated with every new NoteOn MIDI message recieved by a MidiBus attached to this applet.
+
+
noteOn(int, int, int, long, String) - Method in class themidibus.PApplet
+
+
Is passed the channel, pitch and velocity associated with every new NoteOn MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
+
+
noteOn(Note) - Method in class themidibus.PApplet
+
+
Is passed a Note object representing noteOn event
+
+
noteOn(int, int, int) - Method in interface themidibus.SimpleMidiListener
+
+
Objects notifying this SimpleMidiListener of a new NoteOn MIDI message call this method.
+
+
number - Variable in class themidibus.ControlChange
+
 
+
number() - Method in class themidibus.ControlChange
+
+
Return the number of the ControlChange
+
+
+ + + +

O

+
+
ObjectMidiListener - Interface in themidibus
+
+
A ObjectMidiListener can be notified of incomming NoteOn, NoteOff and ControllerChange events via Note and ControlChange objects, usually by a MidiBus object which it is connected to.
+
+
octave() - Method in class themidibus.Note
+
+
Return the octave of the Note.
+
+
+ + + +

P

+
+
PApplet - Class in themidibus
+
+
PApplet is your processing application or sketch.
+
+
PApplet() - Constructor for class themidibus.PApplet
+
 
+
pitch - Variable in class themidibus.Note
+
 
+
pitch() - Method in class themidibus.Note
+
+
Return the pitch of the Note
+
+
+ + + +

R

+
+
rawMidi(byte[]) - Method in class themidibus.PApplet
+
+
Is passed the raw data associated with every new MIDI message recieved by a MidiBus attached to this applet.
+
+
rawMidi(byte[], long, String) - Method in class themidibus.PApplet
+
+
Is passed the raw data associated with every new MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
+
+
RawMidiListener - Interface in themidibus
+
+
A RawMidiListener can be notified of incomming MIDI messages in raw form, usually by a MidiBus object which it is connect to.
+
+
rawMidiMessage(byte[]) - Method in interface themidibus.RawMidiListener
+
+
Objects notifying this RawMidiListener of a new MIDI message call this method and pass the raw message to it.
+
+
registerParent(Object) - Method in class themidibus.MidiBus
+
+
Registers an Object as the parent in order to recieve method callbacks as per PApplet.
+
+
relativePitch() - Method in class themidibus.Note
+
+
Return the pitch of the Note relative to C.
+
+
removeInput(int) - Method in class themidibus.MidiBus
+
+
Removes the MIDI input device specified by the index device_num.
+
+
removeInput(String) - Method in class themidibus.MidiBus
+
+
Removes the MIDI input device specified by the name device_name.
+
+
removeMidiListener(MidiListener) - Method in class themidibus.MidiBus
+
+
Removes a given listener.
+
+
removeOutput(int) - Method in class themidibus.MidiBus
+
+
Removes the MIDI output device specified by the index device_num.
+
+
removeOutput(String) - Method in class themidibus.MidiBus
+
+
Removes the MIDI output device specified by the name device_name.
+
+
+ + + +

S

+
+
sendControllerChange(int, int, int) - Method in class themidibus.MidiBus
+
+
Sends a ControllerChange message to a channel with the specified number and value.
+
+
sendControllerChange(ControlChange) - Method in class themidibus.MidiBus
+
+
Sends a ControllerChange message to a channel with the specified ControlChange.
+
+
sendMessage(byte[]) - Method in class themidibus.MidiBus
+
+
Sends a MIDI message with an unspecified number of bytes.
+
+
sendMessage(int) - Method in class themidibus.MidiBus
+
+
Sends a MIDI message that takes no data bytes.
+
+
sendMessage(int, int) - Method in class themidibus.MidiBus
+
+
Sends a MIDI message that takes only one data byte.
+
+
sendMessage(int, int, int) - Method in class themidibus.MidiBus
+
+
Sends a MIDI message that takes one or two data bytes.
+
+
sendMessage(int, int, int, int) - Method in class themidibus.MidiBus
+
+
Sends a channel message which takes up to two data bytes.
+
+
sendMessage(MidiMessage) - Method in class themidibus.MidiBus
+
+
Sends a MidiMessage object.
+
+
sendNoteOff(int, int, int) - Method in class themidibus.MidiBus
+
+
Sends a NoteOff message to a channel with the specified pitch and velocity.
+
+
sendNoteOff(Note) - Method in class themidibus.MidiBus
+
+
Sends a NoteOff message to a channel with the specified Note.
+
+
sendNoteOn(int, int, int) - Method in class themidibus.MidiBus
+
+
Sends a NoteOn message to a channel with the specified pitch and velocity.
+
+
sendNoteOn(Note) - Method in class themidibus.MidiBus
+
+
Sends a NoteOn message to a channel with the specified Note.
+
+
sendTimestamps() - Method in class themidibus.MidiBus
+
+
Returns whether this MidiBus is sending timestamps along with MIDI information to the MIDI subsystem.
+
+
sendTimestamps(boolean) - Method in class themidibus.MidiBus
+
+
Configure this MidiBus instance to send or not to send timestamps along with MIDI information to the MIDI subsystem.
+
+
setBusName(String) - Method in class themidibus.MidiBus
+
+
Changes the name of this MidiBus.
+
+
setChannel(int) - Method in class themidibus.ControlChange
+
+
Set channel of the ControlChange
+
+
setChannel(int) - Method in class themidibus.Note
+
+
Set channel of the Note
+
+
setNumber(int) - Method in class themidibus.ControlChange
+
+
Set number of the ControlChange
+
+
setPitch(int) - Method in class themidibus.Note
+
+
Set pitch of the Note
+
+
setTicks(int) - Method in class themidibus.Note
+
+
Set length in ticks of the Note
+
+
setValue(int) - Method in class themidibus.ControlChange
+
+
Set value of the ControlChange
+
+
setVelocity(int) - Method in class themidibus.Note
+
+
Set velocity of the Note
+
+
SimpleMidiListener - Interface in themidibus
+
+
A SimpleMidiListener can be notified of incomming NoteOn, NoteOff and ControllerChange MIDI messages, usually by a MidiBus object which it is connected to.
+
+
StandardMidiListener - Interface in themidibus
+
+
A StandardMidiListener can be notified of incomming MIDI messages in MidiMessage form, usually by a MidiBus object which it is connected to.
+
+
stop() - Method in class themidibus.MidiBus
+
+
Closes this MidiBus and all connections it has with other MIDI devices.
+
+
+ + + +

T

+
+
themidibus - package themidibus
+
+
The MidiBus provides a simple way to access and interact with installed MIDI system resources, although it's especially designed to be used with Processing, it could easily be adapted for use in any java program.
+
+
ticks - Variable in class themidibus.Note
+
 
+
ticks() - Method in class themidibus.Note
+
+
Return the length in ticks of the Note
+
+
timestamp - Variable in class themidibus.ControlChange
+
 
+
timestamp - Variable in class themidibus.Note
+
 
+
toString() - Method in class themidibus.ControlChange
+
+
Returns a string in the format [c:channel, n:number, v:value, ts:timestamp, b:bus_name] e.g "[c:0, n:65, v:123, ts:1234, b:bus123]".
+
+
toString() - Method in class themidibus.MidiBus
+
+
Returns a string representation of the object.
+
+
toString() - Method in class themidibus.Note
+
+
Returns a string in the format [Note Name, c:channel, p:pitch, v:velocity, t:ticks, ts:timestamp, b:bus_name] e.g "[C, c:0, p:65, v:123, t:0, ts:1234, b:bus123]".
+
+
+ + + +

U

+
+
unavailableDevices() - Static method in class themidibus.MidiBus
+
+
Returns the names of all the unavailable devices.
+
+
+ + + +

V

+
+
value - Variable in class themidibus.ControlChange
+
 
+
value() - Method in class themidibus.ControlChange
+
+
Return the value of the ControlChange
+
+
velocity - Variable in class themidibus.Note
+
 
+
velocity() - Method in class themidibus.Note
+
+
Return the velocity of the Note
+
+
+A B C D E F G H L M N O P R S T U V 
+ +
+ + + + + +
+ + + + diff --git a/libraries/themidibus/reference/index.html b/libraries/themidibus/reference/index.html new file mode 100644 index 0000000..3df6834 --- /dev/null +++ b/libraries/themidibus/reference/index.html @@ -0,0 +1,64 @@ + + + + + +Generated Documentation (Untitled) + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="themidibus/package-summary.html">Non-frame version</a>.</p> + + + diff --git a/libraries/themidibus/reference/overview-tree.html b/libraries/themidibus/reference/overview-tree.html new file mode 100644 index 0000000..3a844a9 --- /dev/null +++ b/libraries/themidibus/reference/overview-tree.html @@ -0,0 +1,138 @@ + + + + + +Class Hierarchy + + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + +
+ + + + diff --git a/libraries/themidibus/reference/package-list b/libraries/themidibus/reference/package-list new file mode 100644 index 0000000..384b71b --- /dev/null +++ b/libraries/themidibus/reference/package-list @@ -0,0 +1 @@ +themidibus diff --git a/libraries/themidibus/reference/resources/background.gif b/libraries/themidibus/reference/resources/background.gif new file mode 100644 index 0000000000000000000000000000000000000000..f471940fde2f39ef8943a6af9569bcf986b1579b GIT binary patch literal 2313 zcmV+k3HJ6!Nk%w1VKM-40OkMy00030|NlK(aXwsfKV5S}VtGJbbVOr%L0@%CZH88Q zl{{NzcR^uxNo<2iYk@pjY)*5FJz8x~bc{)B zfk z+1T6M-s9WdW8dcJ-wO*3@9+W*5AY543-j^$^!EPz_4eHZ2#>)41`h@dc!2OAgN6$a zCS2I?;lqgx6IR4nkpTe;1RN0f=zxMq2O=q`94V5d$&e>Unta)^<;;^G3>e7yp=ZvW z6DIW3xpSvaogXF?_4%`@(V;s}NR^5J!3hrtJV@1QRV&r5S*L!zYE|rss${iFkg&!? zTN5V#)~=bmMorwgZsEpdOE)iExo+FO-8;8Kga{=HbSQCnF=E6W3?o*|ID%uwi5**> zJXy127Y9m+=HQ|PhXWi+xNwoWv}n_%Pq%(e+H~mGqhq5kv4Mo|-n~g|7!F*xZ{xv< zCpXS~dGg^IGK?4@J-T%b(XnUHFul6n<@2&4)zzyO2) z3Q8`i0+UKY*`$}e9mmp;tg*))`|PsK1|hAo%u0K$vDwm4gaSkm0j{`26k#qAKmbuhxZ#cquDR>B zD{s8+&TH-uNg$C#68QG}1HMBHfrP&L@@w$F_!itRzXdCN@V|LDAu%3!IDtq1#1UV7 z#1RxvT=B(DWbCoU5l=ia$Pp`Hgb_?Mp@hmtxZDI2N-)v#$}PXVvdm1d>@v(v`0TUJ zF)Pu89(q`zv=w^nVTIF3@3BYIPA}c`(@ZCAwbNBEt@PDUKe5CTR8aB66IE1!w%Amt zy+jpcn~k>GZpVFg+H6x{_uOksvBlq0OyT$6TyQZ37k(cOxZr|JE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M#vd12e^_AscAnLnc~-CISiYWX`D%{k^H~<37unpMYJYdSv=Om2vbAM@`Qp{{SI=yP zj6WN*eEt0G$9EPX6FU%)-ho>hWTW!yzXBIo73<0umM-=@eG&niY^` zlG(|vuCl_x(X^Fob@=i{8+M5vWf7Bz=#aHGTNA;fZQyfbfueI8Z^639n`(DI%w^-^ zl`=@!u)r~Xf920-xd$Ab+S&PJY%K0H8a_J8uN3^_!K1_NV$*e#*Y*6|)XpiW=9H`*`Xx7W%v@7{XDma1?v0a%(K6rI&1!a YpWXKgmku8Vj|K)Vje`mzEKCg608Q#dYybcN literal 0 HcmV?d00001 diff --git a/libraries/themidibus/reference/stylesheet.css b/libraries/themidibus/reference/stylesheet.css new file mode 100644 index 0000000..0aeaa97 --- /dev/null +++ b/libraries/themidibus/reference/stylesheet.css @@ -0,0 +1,474 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ +body { + background-color:#ffffff; + color:#353833; + font-family:Arial, Helvetica, sans-serif; + font-size:76%; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4c6b87; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4c6b87; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-size:1.3em; +} +h1 { + font-size:1.8em; +} +h2 { + font-size:1.5em; +} +h3 { + font-size:1.4em; +} +h4 { + font-size:1.3em; +} +h5 { + font-size:1.2em; +} +h6 { + font-size:1.1em; +} +ul { + list-style-type:disc; +} +code, tt { + font-size:1.2em; +} +dt code { + font-size:1.2em; +} +table tr td dt code { + font-size:1.2em; + vertical-align:top; +} +sup { + font-size:.6em; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:.8em; + z-index:200; + margin-top:-7px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + background-image:url(resources/titlebar.gif); + background-position:left top; + background-repeat:no-repeat; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:1em; + margin:0; +} +.topNav { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.bottomNav { + margin-top:10px; + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.subNav { + background-color:#dee3e9; + border-bottom:1px solid #9eadc0; + float:left; + width:100%; + overflow:hidden; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding:3px 6px; +} +ul.subNavList li{ + list-style:none; + float:left; + font-size:90%; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; +} +.navBarCell1Rev { + background-image:url(resources/tab.gif); + background-color:#a88834; + color:#FFFFFF; + margin: auto 5px; + border:1px solid #c9aa44; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader h1 { + font-size:1.3em; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 25px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:1.2em; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:1.0em; +} +.indexContainer h2 { + font-size:1.1em; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:1.1em; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:10px 0 10px 20px; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:25px; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #9eadc0; + background-color:#f9f9f9; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:1px solid #9eadc0; + border-top:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; + border-bottom:1px solid #9eadc0; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.contentContainer table, .classUseContainer table, .constantValuesContainer table { + border-bottom:1px solid #9eadc0; + width:100%; +} +.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { + width:100%; +} +.contentContainer .description table, .contentContainer .details table { + border-bottom:none; +} +.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{ + vertical-align:top; + padding-right:20px; +} +.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast, +.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast, +.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, +.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { + padding-right:3px; +} +.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#FFFFFF; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + margin:0px; +} +caption a:link, caption a:hover, caption a:active, caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { + white-space:nowrap; + padding-top:8px; + padding-left:8px; + display:block; + float:left; + background-image:url(resources/titlebar.gif); + height:18px; +} +.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd { + width:10px; + background-image:url(resources/titlebar_end.gif); + background-repeat:no-repeat; + background-position:top right; + position:relative; + float:left; +} +ul.blockList ul.blockList li.blockList table { + margin:0 0 12px 0px; + width:100%; +} +.tableSubHeadingColor { + background-color: #EEEEFF; +} +.altColor { + background-color:#eeeeef; +} +.rowColor { + background-color:#ffffff; +} +.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td { + text-align:left; + padding:3px 3px 3px 7px; +} +th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { + background:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + text-align:left; + padding:3px 3px 3px 7px; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +td.colFirst, th.colFirst { + border-left:1px solid #9eadc0; + white-space:nowrap; +} +td.colLast, th.colLast { + border-right:1px solid #9eadc0; +} +td.colOne, th.colOne { + border-right:1px solid #9eadc0; + border-left:1px solid #9eadc0; +} +table.overviewSummary { + padding:0px; + margin-left:0px; +} +table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, +table.overviewSummary td.colOne, table.overviewSummary th.colOne { + width:25%; + vertical-align:middle; +} +table.packageSummary td.colFirst, table.overviewSummary th.colFirst { + width:25%; + vertical-align:middle; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:.9em; +} +.block { + display:block; + margin:3px 0 0 0; +} +.strong { + font-weight:bold; +} diff --git a/libraries/themidibus/reference/themidibus/ControlChange.html b/libraries/themidibus/reference/themidibus/ControlChange.html new file mode 100644 index 0000000..65494bc --- /dev/null +++ b/libraries/themidibus/reference/themidibus/ControlChange.html @@ -0,0 +1,509 @@ + + + + + +ControlChange + + + + + + + + + + + +
+
themidibus
+

Class ControlChange

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • themidibus.ControlChange
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class ControlChange
    +extends java.lang.Object
    +
    The ControlChange class represents a change in value from a controller.
    +
    Version:
    +
    008
    +
    Author:
    +
    Severin Smith, Marc Koderer
    +
    See Also:
    MidiBus, +ObjectMidiListener, +Note
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      java.lang.Stringbus_name 
      intchannel 
      intnumber 
      longtimestamp 
      intvalue 
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      ControlChange(int channel, + int number, + int value) +
      Constructs a ControlChange object
      +
      ControlChange(int channel, + int number, + int value, + long timestamp, + java.lang.String bus_name) +
      Constructs a ControlChange object
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      intchannel() +
      Return the channel of the ControlChange
      +
      booleanequals(java.lang.Object obj) +
      Check if all fields are equal.
      +
      intnumber() +
      Return the number of the ControlChange
      +
      voidsetChannel(int channel) +
      Set channel of the ControlChange
      +
      voidsetNumber(int number) +
      Set number of the ControlChange
      +
      voidsetValue(int value) +
      Set value of the ControlChange
      +
      java.lang.StringtoString() +
      Returns a string in the format [c:channel, n:number, v:value, ts:timestamp, b:bus_name] e.g "[c:0, n:65, v:123, ts:1234, b:bus123]".
      +
      intvalue() +
      Return the value of the ControlChange
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        channel

        +
        public int channel
        +
      • +
      + + + +
        +
      • +

        number

        +
        public int number
        +
      • +
      + + + +
        +
      • +

        value

        +
        public int value
        +
      • +
      + + + +
        +
      • +

        timestamp

        +
        public long timestamp
        +
      • +
      + + + +
        +
      • +

        bus_name

        +
        public java.lang.String bus_name
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ControlChange

        +
        public ControlChange(int channel,
        +             int number,
        +             int value)
        +
        Constructs a ControlChange object
        +
        Parameters:
        channel - the channel of the ControlChange
        number - the number of the ControlChange
        value - the value of the ControlChange
        +
      • +
      + + + +
        +
      • +

        ControlChange

        +
        public ControlChange(int channel,
        +             int number,
        +             int value,
        +             long timestamp,
        +             java.lang.String bus_name)
        +
        Constructs a ControlChange object
        +
        Parameters:
        channel - the channel of the ControlChange
        number - the number of the ControlChange
        value - the value of the ControlChange
        timestamp - the timestamp of the ControlChange
        bus_name - the name of MidiBus associated with the ControlChange
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setChannel

        +
        public void setChannel(int channel)
        +
        Set channel of the ControlChange
        +
        Parameters:
        channel - the channel to set
        +
      • +
      + + + +
        +
      • +

        channel

        +
        public int channel()
        +
        Return the channel of the ControlChange
        +
        Returns:
        the channel
        +
      • +
      + + + +
        +
      • +

        setNumber

        +
        public void setNumber(int number)
        +
        Set number of the ControlChange
        +
        Parameters:
        number - the number to set
        +
      • +
      + + + +
        +
      • +

        number

        +
        public int number()
        +
        Return the number of the ControlChange
        +
        Returns:
        the number
        +
      • +
      + + + +
        +
      • +

        setValue

        +
        public void setValue(int value)
        +
        Set value of the ControlChange
        +
        Parameters:
        value - the value to set
        +
      • +
      + + + +
        +
      • +

        value

        +
        public int value()
        +
        Return the value of the ControlChange
        +
        Returns:
        the value
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        Returns a string in the format [c:channel, n:number, v:value, ts:timestamp, b:bus_name] e.g "[c:0, n:65, v:123, ts:1234, b:bus123]". If timestamp or bus_name isn't set, it is omitted.
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        Returns:
        the string representation
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals(java.lang.Object obj)
        +
        Check if all fields are equal.
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        Returns:
        true if both objects can be considered to be equals
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/libraries/themidibus/reference/themidibus/MidiBus.html b/libraries/themidibus/reference/themidibus/MidiBus.html new file mode 100644 index 0000000..6723f0e --- /dev/null +++ b/libraries/themidibus/reference/themidibus/MidiBus.html @@ -0,0 +1,1496 @@ + + + + + +MidiBus + + + + + + + + + + + +
+
themidibus
+

Class MidiBus

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • themidibus.MidiBus
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class MidiBus
    +extends java.lang.Object
    +
    The MidiBus class provides a simple way to send and receive MIDI within Processing sketches. +

    +

    Typical Implementation, Simple

    +

    + A typical simple Processing MIDI application would begin by invoking the static method list() to learn what devices are available. Then using that information a new MidiBus object would be instantiated with with the desired MIDI input and/or output devices. The Processing sketch could then send midi via MidiBus's outgoing methods such as sendNoteOn(int channel, int pitch, int velocity), sendNoteOff(int channel, int pitch, int velocity) and sendControllerChange(int channel, int number, int value) and receive midi via the PApplet methods this package provides support for such as PApplet.noteOn(int channel, int pitch, int velocity), PApplet.noteOff(int channel, int pitch, int velocity) and PApplet.controllerChange(int channel, int number, int value). +

    Typical Implementation, Advanced

    +

    + If you wish to build more complex Processing MIDI applications you can add more input and output devices to any given instance of MidiBus via the addInput() and addOutput() methods. However it is important to understand that each MidiBus object acts like 2 MIDI buses, one for input and one for output. This means, that by design, outgoing MIDI messages are sent to all output devices connected to a given instance of MidiBus, and incomming messages from all input devices connected to a given instance of MidiBus are merged upon reception. In practice, this means that, by design, you cannot tell which of the devices connected to a given instance of MidiBus sent a particular message, nor can you send a MIDI message to one particular device connected to that object. Instead, for independent reception/transmission to different sets of MIDI devices, you can instantiate more than one MidiBus object inside your Processing sketch. Each instance of MidiBus will only send MIDI messages to output devices which are connected to it and inbound MIDI messages arriving at each MidiBus can be diferentiated using the the PApplet methods with the bus_name parameter.

    +
    Version:
    +
    008
    +
    Author:
    +
    Severin Smith
    +
    See Also:
    PApplet, +MidiListener, +RawMidiListener, +StandardMidiListener, +SimpleMidiListener
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      MidiBus() +
      Constructs a new Midibus.
      +
      MidiBus(java.lang.Object parent) +
      Constructs a new MidiBus and registers the specified parent (PApplet or other) for callbacks.
      +
      MidiBus(java.lang.Object parent, + int in_device_num, + int out_device_num) +
      Constructs a new MidiBus and registers the specified parent (PApplet or other) for callbacks.
      +
      MidiBus(java.lang.Object parent, + int in_device_num, + int out_device_num, + java.lang.String bus_name) +
      Constructs a new MidiBus with the specified bus_name and registers the specified parent (PApplet or other) for callbacks.
      +
      MidiBus(java.lang.Object parent, + int in_device_num, + java.lang.String out_device_name) +
      More flavors of constructor, similar to the others, but with mixed arguments
      +
      MidiBus(java.lang.Object parent, + int in_device_num, + java.lang.String out_device_name, + java.lang.String bus_name) +
      More flavors of constructor, similar to the others, but with mixed arguments
      +
      MidiBus(java.lang.Object parent, + java.lang.String bus_name) +
      Constructs a new MidiBus with the specified bus_name and registers the specified parent (PApplet or other) for callbacks.
      +
      MidiBus(java.lang.Object parent, + java.lang.String in_device_name, + int out_device_num) +
      More flavors of constructor, similar to the others, but with mixed arguments
      +
      MidiBus(java.lang.Object parent, + java.lang.String in_device_name, + int out_device_num, + java.lang.String bus_name) +
      More flavors of constructor, similar to the others, but with mixed arguments
      +
      MidiBus(java.lang.Object parent, + java.lang.String in_device_name, + java.lang.String out_device_name) +
      Constructs a new MidiBus and registers the specified parent (PApplet or other) for callbacks.
      +
      MidiBus(java.lang.Object parent, + java.lang.String in_device_name, + java.lang.String out_device_name, + java.lang.String bus_name) +
      Constructs a new MidiBus with the specified bus_name and registers the specified parent (PApplet or other) for callbacks.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      booleanaddInput(int device_num) +
      Adds a new MIDI input device specified by the index device_num.
      +
      booleanaddInput(java.lang.String device_name) +
      Adds a new MIDI input device specified by the name device_name.
      +
      booleanaddMidiListener(MidiListener listener) +
      Adds a listener who will be notified each time a new MIDI message is received from a MIDI input device.
      +
      booleanaddOutput(int device_num) +
      Adds a new MIDI output device specified by the index device_num.
      +
      booleanaddOutput(java.lang.String device_name) +
      Adds a new MIDI output device specified by the name device_name.
      +
      java.lang.String[]attachedInputs() +
      Returns the names of all the attached input devices.
      +
      java.lang.String[]attachedOutputs() +
      Returns the names of all the attached output devices.
      +
      static java.lang.String[]availableInputs() +
      Returns the names of all the available input devices.
      +
      static java.lang.String[]availableOutputs() +
      Returns the names of all the available output devices.
      +
      voidclearAll() +
      Closes, clears and disposes of all input and output related Transmitters and Receivers.
      +
      voidclearInputs() +
      Closes, clears and disposes of all input related Transmitters and Receivers.
      +
      voidclearOutputs() +
      Closes, clears and disposes of all output related Receivers.
      +
      MidiBusclone() +
      Creates and returns a copy of this object.
      +
      voidclose() +
      Closes this MidiBus and all connections it has with other MIDI devices.
      +
      voiddispose() +
      Closes this MidiBus and all connections it has with other MIDI devices.
      +
      booleanequals(java.lang.Object obj) +
      Indicates whether some other object is "equal to" this one.
      +
      protected voidfinalize() +
      Override the finalize() method from java.lang.Object.
      +
      static voidfindMidiDevices() +
      Rescan for Midi Devices.
      +
      voidgenerateBusName() +
      Generate a name for this MidiBus instance.
      +
      java.lang.StringgetBusName() +
      Returns the name of this MidiBus.
      +
      inthashCode() +
      Returns a hash code value for the object.
      +
      static voidlist() +
      List all installed MIDI devices.
      +
      java.lang.ObjectregisterParent(java.lang.Object parent) +
      Registers an Object as the parent in order to recieve method callbacks as per PApplet.
      +
      booleanremoveInput(int device_num) +
      Removes the MIDI input device specified by the index device_num.
      +
      booleanremoveInput(java.lang.String device_name) +
      Removes the MIDI input device specified by the name device_name.
      +
      booleanremoveMidiListener(MidiListener listener) +
      Removes a given listener.
      +
      booleanremoveOutput(int device_num) +
      Removes the MIDI output device specified by the index device_num.
      +
      booleanremoveOutput(java.lang.String device_name) +
      Removes the MIDI output device specified by the name device_name.
      +
      voidsendControllerChange(ControlChange change) +
      Sends a ControllerChange message to a channel with the specified ControlChange.
      +
      voidsendControllerChange(int channel, + int number, + int value) +
      Sends a ControllerChange message to a channel with the specified number and value.
      +
      voidsendMessage(byte[] data) +
      Sends a MIDI message with an unspecified number of bytes.
      +
      voidsendMessage(int status) +
      Sends a MIDI message that takes no data bytes.
      +
      voidsendMessage(int status, + int data) +
      Sends a MIDI message that takes only one data byte.
      +
      voidsendMessage(int status, + int data1, + int data2) +
      Sends a MIDI message that takes one or two data bytes.
      +
      voidsendMessage(int command, + int channel, + int data1, + int data2) +
      Sends a channel message which takes up to two data bytes.
      +
      voidsendMessage(javax.sound.midi.MidiMessage message) +
      Sends a MidiMessage object.
      +
      voidsendNoteOff(int channel, + int pitch, + int velocity) +
      Sends a NoteOff message to a channel with the specified pitch and velocity.
      +
      voidsendNoteOff(Note note) +
      Sends a NoteOff message to a channel with the specified Note.
      +
      voidsendNoteOn(int channel, + int pitch, + int velocity) +
      Sends a NoteOn message to a channel with the specified pitch and velocity.
      +
      voidsendNoteOn(Note note) +
      Sends a NoteOn message to a channel with the specified Note.
      +
      booleansendTimestamps() +
      Returns whether this MidiBus is sending timestamps along with MIDI information to the MIDI subsystem.
      +
      voidsendTimestamps(boolean sendTimestamps) +
      Configure this MidiBus instance to send or not to send timestamps along with MIDI information to the MIDI subsystem.
      +
      voidsetBusName(java.lang.String bus_name) +
      Changes the name of this MidiBus.
      +
      voidstop() +
      Closes this MidiBus and all connections it has with other MIDI devices.
      +
      java.lang.StringtoString() +
      Returns a string representation of the object.
      +
      static java.lang.String[]unavailableDevices() +
      Returns the names of all the unavailable devices.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+ +
+
+ + + + + + + diff --git a/libraries/themidibus/reference/themidibus/MidiListener.html b/libraries/themidibus/reference/themidibus/MidiListener.html new file mode 100644 index 0000000..8c0ed5c --- /dev/null +++ b/libraries/themidibus/reference/themidibus/MidiListener.html @@ -0,0 +1,168 @@ + + + + + +MidiListener + + + + + + + + + + + +
+
themidibus
+

Interface MidiListener

+
+
+
+ +
+
+ + + + + + + diff --git a/libraries/themidibus/reference/themidibus/Note.html b/libraries/themidibus/reference/themidibus/Note.html new file mode 100644 index 0000000..00084b1 --- /dev/null +++ b/libraries/themidibus/reference/themidibus/Note.html @@ -0,0 +1,655 @@ + + + + + +Note + + + + + + + + + + + +
+
themidibus
+

Class Note

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • themidibus.Note
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Note
    +extends java.lang.Object
    +
    The Note class represents a pressed or released key.
    +
    Version:
    +
    008
    +
    Author:
    +
    Severin Smith, Marc Koderer
    +
    See Also:
    MidiBus, +ObjectMidiListener, +ControlChange
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      Note(int channel, + int pitch, + int velocity) +
      Constructs a Note object
      +
      Note(int channel, + int pitch, + int velocity, + int ticks) +
      Constructs a Note object
      +
      Note(int channel, + int pitch, + int velocity, + int ticks, + long timestamp, + java.lang.String bus_name) +
      Constructs a Note object
      +
      Note(int channel, + int pitch, + int velocity, + long timestamp, + java.lang.String bus_name) +
      Constructs a Note object
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      intchannel() +
      Return the channel of the Note
      +
      booleanequals(java.lang.Object obj) +
      Check if all fields are equal.
      +
      java.lang.Stringname() +
      Return the name of the note, e.g.
      +
      intoctave() +
      Return the octave of the Note.
      +
      intpitch() +
      Return the pitch of the Note
      +
      intrelativePitch() +
      Return the pitch of the Note relative to C.
      +
      voidsetChannel(int channel) +
      Set channel of the Note
      +
      voidsetPitch(int pitch) +
      Set pitch of the Note
      +
      voidsetTicks(int ticks) +
      Set length in ticks of the Note
      +
      voidsetVelocity(int velocity) +
      Set velocity of the Note
      +
      longticks() +
      Return the length in ticks of the Note
      +
      java.lang.StringtoString() +
      Returns a string in the format [Note Name, c:channel, p:pitch, v:velocity, t:ticks, ts:timestamp, b:bus_name] e.g "[C, c:0, p:65, v:123, t:0, ts:1234, b:bus123]".
      +
      intvelocity() +
      Return the velocity of the Note
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        channel

        +
        public int channel
        +
      • +
      + + + +
        +
      • +

        pitch

        +
        public int pitch
        +
      • +
      + + + +
        +
      • +

        velocity

        +
        public int velocity
        +
      • +
      + + + +
        +
      • +

        ticks

        +
        public long ticks
        +
      • +
      + + + +
        +
      • +

        timestamp

        +
        public long timestamp
        +
      • +
      + + + +
        +
      • +

        bus_name

        +
        public java.lang.String bus_name
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Note

        +
        public Note(int channel,
        +    int pitch,
        +    int velocity)
        +
        Constructs a Note object
        +
        Parameters:
        channel - the channel of the Note
        pitch - the pitch of the Note
        velocity - the velocity of the Note
        +
      • +
      + + + +
        +
      • +

        Note

        +
        public Note(int channel,
        +    int pitch,
        +    int velocity,
        +    int ticks)
        +
        Constructs a Note object
        +
        Parameters:
        channel - the channel of the Note
        pitch - the pitch of the Note
        velocity - the velocity of the Note
        ticks - the length in ticks of the Note
        +
      • +
      + + + +
        +
      • +

        Note

        +
        public Note(int channel,
        +    int pitch,
        +    int velocity,
        +    long timestamp,
        +    java.lang.String bus_name)
        +
        Constructs a Note object
        +
        Parameters:
        channel - the channel of the Note
        pitch - the pitch of the Note
        velocity - the velocity of the Note
        timestamp - the timestamp of the Note
        bus_name - the name of MidiBus associated with the Note
        +
      • +
      + + + +
        +
      • +

        Note

        +
        public Note(int channel,
        +    int pitch,
        +    int velocity,
        +    int ticks,
        +    long timestamp,
        +    java.lang.String bus_name)
        +
        Constructs a Note object
        +
        Parameters:
        channel - the channel of the Note
        pitch - the pitch of the Note
        velocity - the velocity of the Note
        ticks - the length in ticks of the Note
        timestamp - the timestamp of the Note
        bus_name - the name of MidiBus associated with the Note
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setChannel

        +
        public void setChannel(int channel)
        +
        Set channel of the Note
        +
        Parameters:
        channel - the channel to set
        +
      • +
      + + + +
        +
      • +

        channel

        +
        public int channel()
        +
        Return the channel of the Note
        +
        Returns:
        the channel
        +
      • +
      + + + +
        +
      • +

        setPitch

        +
        public void setPitch(int pitch)
        +
        Set pitch of the Note
        +
        Parameters:
        pitch - the pitch to set
        +
      • +
      + + + +
        +
      • +

        pitch

        +
        public int pitch()
        +
        Return the pitch of the Note
        +
        Returns:
        the pitch
        +
      • +
      + + + +
        +
      • +

        relativePitch

        +
        public int relativePitch()
        +
        Return the pitch of the Note relative to C. Range is 0-12.
        +
        Returns:
        the relative pitch
        +
      • +
      + + + +
        +
      • +

        octave

        +
        public int octave()
        +
        Return the octave of the Note. Octaves are divided by the note C
        +
        Returns:
        the octave
        +
      • +
      + + + +
        +
      • +

        name

        +
        public java.lang.String name()
        +
        Return the name of the note, e.g. "C" or "G#".
        +
        Returns:
        the note name
        +
      • +
      + + + +
        +
      • +

        setVelocity

        +
        public void setVelocity(int velocity)
        +
        Set velocity of the Note
        +
        Parameters:
        velocity - the velocity to set
        +
      • +
      + + + +
        +
      • +

        velocity

        +
        public int velocity()
        +
        Return the velocity of the Note
        +
        Returns:
        the velocity
        +
      • +
      + + + +
        +
      • +

        setTicks

        +
        public void setTicks(int ticks)
        +
        Set length in ticks of the Note
        +
        Parameters:
        ticks - the ticks value to set
        +
      • +
      + + + +
        +
      • +

        ticks

        +
        public long ticks()
        +
        Return the length in ticks of the Note
        +
        Returns:
        the ticks length
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        Returns a string in the format [Note Name, c:channel, p:pitch, v:velocity, t:ticks, ts:timestamp, b:bus_name] e.g "[C, c:0, p:65, v:123, t:0, ts:1234, b:bus123]". If ticks, timestamp or bus_name isn't set, it is omitted.
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        Returns:
        the string representation
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals(java.lang.Object obj)
        +
        Check if all fields are equal.
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        Returns:
        true if both objects can be considered to be equals
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/libraries/themidibus/reference/themidibus/ObjectMidiListener.html b/libraries/themidibus/reference/themidibus/ObjectMidiListener.html new file mode 100644 index 0000000..14e086e --- /dev/null +++ b/libraries/themidibus/reference/themidibus/ObjectMidiListener.html @@ -0,0 +1,257 @@ + + + + + +ObjectMidiListener + + + + + + + + + + + +
+
themidibus
+

Interface ObjectMidiListener

+
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      voidcontrollerChange(ControlChange change) +
      Objects notifying this ObjectMidiListener of a new ControllerChange events call this method.
      +
      voidnoteOff(Note note) +
      Objects notifying this ObjectMidiListener of a new NoteOff events call this method.
      +
      voidnoteOn(Note note) +
      Objects notifying this ObjectMidiListener of a new NoteOn events call this method.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        noteOn

        +
        void noteOn(Note note)
        +
        Objects notifying this ObjectMidiListener of a new NoteOn events call this method.
        +
        Parameters:
        note - the note object associated with this event
        +
      • +
      + + + +
        +
      • +

        noteOff

        +
        void noteOff(Note note)
        +
        Objects notifying this ObjectMidiListener of a new NoteOff events call this method.
        +
        Parameters:
        note - the note object associated with this event
        +
      • +
      + + + +
        +
      • +

        controllerChange

        +
        void controllerChange(ControlChange change)
        +
        Objects notifying this ObjectMidiListener of a new ControllerChange events call this method.
        +
        Parameters:
        change - the ControlChange object associated with this event
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/libraries/themidibus/reference/themidibus/PApplet.html b/libraries/themidibus/reference/themidibus/PApplet.html new file mode 100644 index 0000000..66e3a1c --- /dev/null +++ b/libraries/themidibus/reference/themidibus/PApplet.html @@ -0,0 +1,519 @@ + + + + + +PApplet + + + + + + + + + + + +
+
themidibus
+

Class PApplet

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • themidibus.PApplet
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class PApplet
    +extends java.lang.Object
    +
    PApplet is your processing application or sketch. In it you can implement the following methods which will be called whenerever a MidiBus object attached to the PApplet, recieves a new incomming MIDI message of the appropriate type. +

    + Note: This page is a dummy page for documentation of the MidiBus' extention of the regular PApplet's functionality, for the full documentation of PApplet please visits the Processing javadocs

    +
    Version:
    +
    008
    +
    Author:
    +
    Severin Smith
    +
    See Also:
    MidiBus, +MidiListener, +RawMidiListener, +StandardMidiListener, +SimpleMidiListener
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      PApplet() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      voidcontrollerChange(ControlChange change) +
      Is passed a ControlChange object representing controlChange event
      +
      voidcontrollerChange(int channel, + int number, + int value) +
      Is passed the channel, controller number and contoller value associated with every new ContollerChange MIDI message recieved by a MidiBus attached to this applet.
      +
      voidcontrollerChange(int channel, + int number, + int value, + long timestamp, + java.lang.String bus_name) +
      Is passed the channel, pitch and velocity associated with every new NoteOff MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
      +
      voidmidiMessage(javax.sound.midi.MidiMessage message) +
      Is passed the raw MidiMessage associated with every new MIDI message recieved by a MidiBus attached to this applet.
      +
      voidmidiMessage(javax.sound.midi.MidiMessage message, + long timestamp, + java.lang.String bus_name) +
      Is passed the raw MidiMessage associated with every new MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
      +
      voidnoteOff(int channel, + int pitch, + int velocity) +
      Is passed the channel, pitch and velocity associated with every new NoteOff MIDI message recieved by a MidiBus attached to this applet.
      +
      voidnoteOff(int channel, + int pitch, + int velocity, + long timestamp, + java.lang.String bus_name) +
      Is passed the channel, pitch and velocity associated with every new NoteOff MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
      +
      voidnoteOff(Note note) +
      Is passed a Note object representing noteOff event
      +
      voidnoteOn(int channel, + int pitch, + int velocity) +
      Is passed the channel, pitch and velocity associated with every new NoteOn MIDI message recieved by a MidiBus attached to this applet.
      +
      voidnoteOn(int channel, + int pitch, + int velocity, + long timestamp, + java.lang.String bus_name) +
      Is passed the channel, pitch and velocity associated with every new NoteOn MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
      +
      voidnoteOn(Note note) +
      Is passed a Note object representing noteOn event
      +
      voidrawMidi(byte[] data) +
      Is passed the raw data associated with every new MIDI message recieved by a MidiBus attached to this applet.
      +
      voidrawMidi(byte[] data, + long timestamp, + java.lang.String bus_name) +
      Is passed the raw data associated with every new MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PApplet

        +
        public PApplet()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        controllerChange

        +
        public void controllerChange(int channel,
        +                    int number,
        +                    int value)
        +
        Is passed the channel, controller number and contoller value associated with every new ContollerChange MIDI message recieved by a MidiBus attached to this applet.
        +
        Parameters:
        channel - the channel on which the ContollerChange arrived
        number - the controller number associated with the ContollerChange
        value - the controller value associated with the ContollerChange
        See Also:
        controllerChange(int channel, int pitch, int velocity, long timestamp, String bus_name)
        +
      • +
      + + + +
        +
      • +

        controllerChange

        +
        public void controllerChange(int channel,
        +                    int number,
        +                    int value,
        +                    long timestamp,
        +                    java.lang.String bus_name)
        +
        Is passed the channel, pitch and velocity associated with every new NoteOff MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
        +
        Parameters:
        channel - the channel on which the ContollerChange arrived
        number - the controller number associated with the ContollerChange
        value - the controller value associated with the ContollerChange
        timestamp - the timestamp on the midi message
        bus_name - the name of MidiBus which recieved the ContollerChange
        See Also:
        controllerChange(int channel, int pitch, int velocity)
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        midiMessage

        +
        public void midiMessage(javax.sound.midi.MidiMessage message,
        +               long timestamp,
        +               java.lang.String bus_name)
        +
        Is passed the raw MidiMessage associated with every new MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
        +
        Parameters:
        message - the MidiMessage recieved
        timestamp - the timestamp on the midi message
        bus_name - the name of MidiBus which recieved the MIDI message
        See Also:
        midiMessage(MidiMessage message)
        +
      • +
      + + + +
        +
      • +

        noteOff

        +
        public void noteOff(int channel,
        +           int pitch,
        +           int velocity)
        +
        Is passed the channel, pitch and velocity associated with every new NoteOff MIDI message recieved by a MidiBus attached to this applet.
        +
        Parameters:
        channel - the channel on which the NoteOff arrived
        pitch - the pitch associated with the NoteOff
        velocity - the velocity associated with the NoteOff
        See Also:
        noteOff(int channel, int pitch, int velocity, long timestamp, String bus_name)
        +
      • +
      + + + +
        +
      • +

        noteOff

        +
        public void noteOff(int channel,
        +           int pitch,
        +           int velocity,
        +           long timestamp,
        +           java.lang.String bus_name)
        +
        Is passed the channel, pitch and velocity associated with every new NoteOff MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
        +
        Parameters:
        channel - the channel on which the NoteOff arrived
        pitch - the pitch associated with the NoteOff
        velocity - the velocity associated with the NoteOff
        timestamp - the timestamp on the midi message
        bus_name - the name of MidiBus which recieved the NoteOff
        See Also:
        noteOff(int channel, int pitch, int velocity)
        +
      • +
      + + + + + + + +
        +
      • +

        noteOn

        +
        public void noteOn(int channel,
        +          int pitch,
        +          int velocity)
        +
        Is passed the channel, pitch and velocity associated with every new NoteOn MIDI message recieved by a MidiBus attached to this applet.
        +
        Parameters:
        channel - the channel on which the NoteOn arrived
        pitch - the pitch associated with the NoteOn
        velocity - the velocity associated with the NoteOn
        See Also:
        noteOn(int channel, int pitch, int velocity, long timestamp, String bus_name)
        +
      • +
      + + + +
        +
      • +

        noteOn

        +
        public void noteOn(int channel,
        +          int pitch,
        +          int velocity,
        +          long timestamp,
        +          java.lang.String bus_name)
        +
        Is passed the channel, pitch and velocity associated with every new NoteOn MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
        +
        Parameters:
        channel - the channel on which the NoteOn arrived
        pitch - the pitch associated with the NoteOn
        velocity - the velocity associated with the NoteOn
        timestamp - the timestamp on the midi message
        bus_name - the name of MidiBus which recieved the NoteOn
        See Also:
        noteOn(int channel, int pitch, int velocity)
        +
      • +
      + + + + + + + +
        +
      • +

        rawMidi

        +
        public void rawMidi(byte[] data)
        +
        Is passed the raw data associated with every new MIDI message recieved by a MidiBus attached to this applet.
        +
        Parameters:
        data - the raw data associated with the MIDI message
        See Also:
        rawMidi(byte[] data, long timestamp, String bus_name)
        +
      • +
      + + + +
        +
      • +

        rawMidi

        +
        public void rawMidi(byte[] data,
        +           long timestamp,
        +           java.lang.String bus_name)
        +
        Is passed the raw data associated with every new MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message.
        +
        Parameters:
        data - the raw data associated with the MIDI message
        timestamp - the timestamp on the midi message
        bus_name - the name of MidiBus which recieved the MIDI message
        See Also:
        rawMidi(byte[] data)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/libraries/themidibus/reference/themidibus/RawMidiListener.html b/libraries/themidibus/reference/themidibus/RawMidiListener.html new file mode 100644 index 0000000..45f2697 --- /dev/null +++ b/libraries/themidibus/reference/themidibus/RawMidiListener.html @@ -0,0 +1,221 @@ + + + + + +RawMidiListener + + + + + + + + + + + +
+
themidibus
+

Interface RawMidiListener

+
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      voidrawMidiMessage(byte[] data) +
      Objects notifying this RawMidiListener of a new MIDI message call this method and pass the raw message to it.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        rawMidiMessage

        +
        void rawMidiMessage(byte[] data)
        +
        Objects notifying this RawMidiListener of a new MIDI message call this method and pass the raw message to it.
        +
        Parameters:
        data - the data bytes that make up the MIDI message
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/libraries/themidibus/reference/themidibus/SimpleMidiListener.html b/libraries/themidibus/reference/themidibus/SimpleMidiListener.html new file mode 100644 index 0000000..9328e5f --- /dev/null +++ b/libraries/themidibus/reference/themidibus/SimpleMidiListener.html @@ -0,0 +1,267 @@ + + + + + +SimpleMidiListener + + + + + + + + + + + +
+
themidibus
+

Interface SimpleMidiListener

+
+
+
+
    +
  • +
    +
    All Superinterfaces:
    +
    MidiListener
    +
    +
    +
    +
    public interface SimpleMidiListener
    +extends MidiListener
    +
    A SimpleMidiListener can be notified of incomming NoteOn, NoteOff and ControllerChange MIDI messages, usually by a MidiBus object which it is connected to. Typically it would analyse and react to incomming MIDI messages in some useful way.
    +
    Version:
    +
    008
    +
    Author:
    +
    Severin Smith
    +
    See Also:
    MidiListener, +RawMidiListener, +StandardMidiListener, +ObjectMidiListener, +MidiBus
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      voidcontrollerChange(int channel, + int number, + int value) +
      Objects notifying this SimpleMidiListener of a new ControllerChange MIDI message call this method.
      +
      voidnoteOff(int channel, + int pitch, + int velocity) +
      Objects notifying this SimpleMidiListener of a new NoteOff MIDI message call this method.
      +
      voidnoteOn(int channel, + int pitch, + int velocity) +
      Objects notifying this SimpleMidiListener of a new NoteOn MIDI message call this method.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        noteOn

        +
        void noteOn(int channel,
        +          int pitch,
        +          int velocity)
        +
        Objects notifying this SimpleMidiListener of a new NoteOn MIDI message call this method.
        +
        Parameters:
        channel - the channel on which the NoteOn arrived
        pitch - the pitch associated with the NoteOn
        velocity - the velocity associated with the NoteOn
        +
      • +
      + + + +
        +
      • +

        noteOff

        +
        void noteOff(int channel,
        +           int pitch,
        +           int velocity)
        +
        Objects notifying this SimpleMidiListener of a new NoteOff MIDI message call this method.
        +
        Parameters:
        channel - the channel on which the NoteOff arrived
        pitch - the pitch associated with the NoteOff
        velocity - the velocity associated with the NoteOff
        +
      • +
      + + + +
        +
      • +

        controllerChange

        +
        void controllerChange(int channel,
        +                    int number,
        +                    int value)
        +
        Objects notifying this SimpleMidiListener of a new ControllerChange MIDI message call this method.
        +
        Parameters:
        channel - the channel on which the ContollerChange arrived
        number - the controller number associated with the ContollerChange
        value - the controller value associated with the ContollerChange
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/libraries/themidibus/reference/themidibus/StandardMidiListener.html b/libraries/themidibus/reference/themidibus/StandardMidiListener.html new file mode 100644 index 0000000..203a087 --- /dev/null +++ b/libraries/themidibus/reference/themidibus/StandardMidiListener.html @@ -0,0 +1,224 @@ + + + + + +StandardMidiListener + + + + + + + + + + + +
+
themidibus
+

Interface StandardMidiListener

+
+
+
+
    +
  • +
    +
    All Superinterfaces:
    +
    MidiListener
    +
    +
    +
    +
    public interface StandardMidiListener
    +extends MidiListener
    +
    A StandardMidiListener can be notified of incomming MIDI messages in MidiMessage form, usually by a MidiBus object which it is connected to. Typically it would analyse and react to incomming MIDI messages in some useful way.
    +
    Version:
    +
    008
    +
    Author:
    +
    Severin Smith
    +
    See Also:
    MidiListener, +RawMidiListener, +SimpleMidiListener, +ObjectMidiListener, +MidiBus, +MidiMessage
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      voidmidiMessage(javax.sound.midi.MidiMessage message, + long timeStamp) +
      Objects notifying this StandardMidiListener of a new MIDI message call this method and pass the MidiMessage
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        midiMessage

        +
        void midiMessage(javax.sound.midi.MidiMessage message,
        +               long timeStamp)
        +
        Objects notifying this StandardMidiListener of a new MIDI message call this method and pass the MidiMessage
        +
        Parameters:
        message - the MidiMessage received
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/libraries/themidibus/reference/themidibus/package-frame.html b/libraries/themidibus/reference/themidibus/package-frame.html new file mode 100644 index 0000000..e003db2 --- /dev/null +++ b/libraries/themidibus/reference/themidibus/package-frame.html @@ -0,0 +1,30 @@ + + + + + +themidibus + + + + +

themidibus

+ + + diff --git a/libraries/themidibus/reference/themidibus/package-summary.html b/libraries/themidibus/reference/themidibus/package-summary.html new file mode 100644 index 0000000..151ed95 --- /dev/null +++ b/libraries/themidibus/reference/themidibus/package-summary.html @@ -0,0 +1,218 @@ + + + + + +themidibus + + + + + + + + + + +
+

Package themidibus

+
+
The MidiBus provides a simple way to access and interact with installed MIDI system resources, although it's especially designed to be used with Processing, it could easily be adapted for use in any java program.
+
+

See: Description

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    MidiListener +
    This is a placeholder interface which makes it easier to program and manipulate objects which implement subinterfaces of MidiListener like RawMidiListener, SimpleMidiListener or StandardMidiListener.
    +
    ObjectMidiListener +
    A ObjectMidiListener can be notified of incomming NoteOn, NoteOff and ControllerChange events via Note and ControlChange objects, usually by a MidiBus object which it is connected to.
    +
    RawMidiListener +
    A RawMidiListener can be notified of incomming MIDI messages in raw form, usually by a MidiBus object which it is connect to.
    +
    SimpleMidiListener +
    A SimpleMidiListener can be notified of incomming NoteOn, NoteOff and ControllerChange MIDI messages, usually by a MidiBus object which it is connected to.
    +
    StandardMidiListener +
    A StandardMidiListener can be notified of incomming MIDI messages in MidiMessage form, usually by a MidiBus object which it is connected to.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    ControlChange +
    The ControlChange class represents a change in value from a controller.
    +
    MidiBus +
    The MidiBus class provides a simple way to send and receive MIDI within Processing sketches.
    +
    Note +
    The Note class represents a pressed or released key.
    +
    PApplet +
    PApplet is your processing application or sketch.
    +
    +
  • +
+ + + +

Package themidibus Description

+
The MidiBus provides a simple way to access and interact with installed MIDI system resources, although it's especially designed to be used with Processing, it could easily be adapted for use in any java program. +

+ IMPORTANT: Mac users may want to install mmj, a Mac OS X universal binary java MIDI subsystem - or an equivalent third party MIDI subsystem - because the apple implementation is lacking support for a number of advanced MIDI features. Mmj is recommended because it works, it's free and it's almost open source (CC licence). Please check README.md for more information. If you do use MMJ you will want to set MidiBus.sendTimestamps(boolean sendTimestamps) to false, otherwise messages won't be sent. +

+ Keeping with the spirit of Processing's easy to use sketching/prototyping style, the MidiBus offers a clean and simple way to get at MIDI ressources. Getting the basic functionality of the MidiBus up and running in a sketch is a matter of only a few line. The MidiBus class provides everything needed send and receive MIDI inside a sketch. To jump right into the Midibus, either refer to the paragraph titled "Typical Implementation, Simple" in the description for the MidiBus class, or check out the code examples distributed with this library. +


+ It is important to understand that the MidiBus offers little functionality that isn't available from Java's native javax.sound.midi package. Anyone interested in working with MIDI in Java should take the time to read the documentation for the javax.sound.midi. It offers a more full featured and flexible alternative to this package, although it does do so at the cost of added complexity. In addition, it may be worthwhile to skim the "official" Java Tutorial for the javax.sound.* packages. +


+

Related Documentation

+
+
Version:
+
008
+
Author:
+
Severin Smith
+
+ + + + + + diff --git a/libraries/themidibus/reference/themidibus/package-tree.html b/libraries/themidibus/reference/themidibus/package-tree.html new file mode 100644 index 0000000..a83f6cf --- /dev/null +++ b/libraries/themidibus/reference/themidibus/package-tree.html @@ -0,0 +1,134 @@ + + + + + +themidibus Class Hierarchy + + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For Package themidibus

+
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + +
+ + + + diff --git a/libraries/themidibus/src/themidibus/ControlChange.java b/libraries/themidibus/src/themidibus/ControlChange.java new file mode 100644 index 0000000..a83f4a7 --- /dev/null +++ b/libraries/themidibus/src/themidibus/ControlChange.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) 2009 Severin Smith + * + * This file is part of a library called The MidiBus (themidibus) - http://www.smallbutdigital.com/themidibus.php. + * + * The MidiBus is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The MidiBus is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the MidiBus. If not, see . +*/ + +package themidibus; + +/** + * The ControlChange class represents a change in value from a controller. + * + * @version 008 + * @author Severin Smith, Marc Koderer + * @see MidiBus + * @see ObjectMidiListener + * @see Note +*/ + +public class ControlChange { + + public int channel; + public int number; + public int value; + + public long timestamp; + public String bus_name; + + /** + * Constructs a ControlChange object + * + * @param channel the channel of the ControlChange + * @param number the number of the ControlChange + * @param value the value of the ControlChange + */ + public ControlChange(int channel, int number, int value) { + this(channel, number, value, -1, null); + } + + + /** + * Constructs a ControlChange object + * + * @param channel the channel of the ControlChange + * @param number the number of the ControlChange + * @param value the value of the ControlChange + * @param timestamp the timestamp of the ControlChange + * @param bus_name the name of MidiBus associated with the ControlChange + */ + public ControlChange(int channel, int number, int value, long timestamp, String bus_name) { + this.channel = channel; + this.number = number; + this.value = value; + + this.timestamp = timestamp; + this.bus_name = bus_name; + } + + /** + * Set channel of the ControlChange + * + * @param channel the channel to set + */ + public void setChannel(int channel) { + this.channel = channel; + } + + /** + * Return the channel of the ControlChange + * + * @return the channel + */ + public int channel() { + return channel; + } + + /** + * Set number of the ControlChange + * + * @param number the number to set + */ + public void setNumber(int number) { + this.number = number; + } + + /** + * Return the number of the ControlChange + * + * @return the number + */ + public int number() { + return number; + } + + /** + * Set value of the ControlChange + * + * @param value the value to set + */ + public void setValue(int value) { + this.value = value; + } + + /** + * Return the value of the ControlChange + * + * @return the value + */ + public int value() { + return value; + } + + /** + * Returns a string in the format [c:channel, n:number, v:value, ts:timestamp, b:bus_name] e.g "[c:0, n:65, v:123, ts:1234, b:bus123]". If timestamp or bus_name isn't set, it is omitted. + * + * @return the string representation + */ + public String toString() { + String result = "[c:" + channel + ", v:" + number + ", n:" + value; + if(timestamp != -1) result += ", ts:" + timestamp; + if(bus_name != null) result += ", b:" + bus_name; + result += "]"; + + return result; + } + + /** + * Check if all fields are equal. + * + * @return true if both objects can be considered to be equals + */ + public boolean equals(Object obj) { + if(this == obj) return true; + if(obj == null) return false; + + if(getClass() != obj.getClass()) return false; + + ControlChange other = (ControlChange)obj; + + if(other.channel != this.channel) return false; + if(other.number != this.number) return false; + if(other.value != this.value) return false; + + if(other.timestamp != this.timestamp) return false; + if(other.bus_name != this.bus_name) return false; + + return true; + } + +} diff --git a/libraries/themidibus/src/themidibus/MidiBus.java b/libraries/themidibus/src/themidibus/MidiBus.java new file mode 100644 index 0000000..0ae3aa8 --- /dev/null +++ b/libraries/themidibus/src/themidibus/MidiBus.java @@ -0,0 +1,1783 @@ +/** + * Copyright (c) 2009 Severin Smith + * + * This file is part of a library called The MidiBus (themidibus) - http://www.smallbutdigital.com/themidibus.php. + * + * The MidiBus is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * The MidiBus is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the MidiBus. If not, see . +*/ + +package themidibus; + +import javax.sound.midi.*; +import java.util.Vector; +import java.util.Formatter; + +import processing.core.PApplet; +import java.lang.reflect.Method; + +/** + * The MidiBus class provides a simple way to send and receive MIDI within Processing sketches. + *

+ *

Typical Implementation, Simple

+ *

+ * A typical simple Processing MIDI application would begin by invoking the static method {@link #list()} to learn what devices are available. Then using that information a new MidiBus object would be instantiated with with the desired MIDI input and/or output devices. The Processing sketch could then send midi via MidiBus's outgoing methods such as {@link #sendNoteOn(int channel, int pitch, int velocity)}, {@link #sendNoteOff(int channel, int pitch, int velocity)} and {@link #sendControllerChange(int channel, int number, int value)} and receive midi via the PApplet methods this package provides support for such as {@link PApplet#noteOn(int channel, int pitch, int velocity)}, {@link PApplet#noteOff(int channel, int pitch, int velocity)} and {@link PApplet#controllerChange(int channel, int number, int value)}. + *

Typical Implementation, Advanced

+ *

+ * If you wish to build more complex Processing MIDI applications you can add more input and output devices to any given instance of MidiBus via the addInput() and addOutput() methods. However it is important to understand that each MidiBus object acts like 2 MIDI buses, one for input and one for output. This means, that by design, outgoing MIDI messages are sent to all output devices connected to a given instance of MidiBus, and incomming messages from all input devices connected to a given instance of MidiBus are merged upon reception. In practice, this means that, by design, you cannot tell which of the devices connected to a given instance of MidiBus sent a particular message, nor can you send a MIDI message to one particular device connected to that object. Instead, for independent reception/transmission to different sets of MIDI devices, you can instantiate more than one MidiBus object inside your Processing sketch. Each instance of MidiBus will only send MIDI messages to output devices which are connected to it and inbound MIDI messages arriving at each MidiBus can be diferentiated using the the {@link PApplet} methods with the bus_name parameter. + * + * @version 008 + * @author Severin Smith + * @see PApplet + * @see MidiListener + * @see RawMidiListener + * @see StandardMidiListener + * @see SimpleMidiListener +*/ +public class MidiBus { + + static MidiDevice.Info[] available_devices; + + String bus_name; + + Vector input_devices; + Vector output_devices; + + Vector listeners; + + Object parent; + + Method method_note_on, method_note_off, method_controller_change, method_raw_midi, method_midi_message; + Method method_note_on_with_bus_name, method_note_off_with_bus_name, method_controller_change_with_bus_name, method_raw_midi_with_bus_name, method_midi_message_with_bus_name; + Method method_note_on_wcla, method_note_off_wcla, method_controller_change_wcla; + + boolean sendTimestamps; + + /* -- Constructors -- */ + + /** + * Constructs a new Midibus. The new Midibus's bus_name will be generated automatically. + * + * @see #addInput(int device_num) + * @see #addInput(String device_name) + * @see #addOutput(int device_num) + * @see #addOutput(String device_name) + * @see #list() + */ + public MidiBus() { + init(null, null); + } + + /** + * Constructs a new MidiBus and registers the specified parent (PApplet or other) for callbacks. No input or output MIDI devices will be opened. The new MidiBus's bus_name will be generated automatically. + * + * @param parent the parent to which this MidiBus is attached. + * @see #addInput(int device_num) + * @see #addInput(String device_name) + * @see #addOutput(int device_num) + * @see #addOutput(String device_name) + * @see #list() + */ + public MidiBus(Object parent) { + init(parent, null); + } + + /** + * Constructs a new MidiBus with the specified bus_name and registers the specified parent (PApplet or other) for callbacks. No input or output MIDI devices will be opened. + * + * @param parent the parent to which this MidiBus is attached. + * @param bus_name the String which which identifies this MidiBus. + * @see #addInput(int device_num) + * @see #addInput(String device_name) + * @see #addOutput(int device_num) + * @see #addOutput(String device_name) + * @see #list() + */ + public MidiBus(Object parent, String bus_name) { + init(parent, bus_name); + } + + /** + * Constructs a new MidiBus and registers the specified parent (PApplet or other) for callbacks. Opens the MIDI input and output devices specified by the indexes in_device_num and out_device_num. A value of -1 can be passed to in_device_num if no input MIDI device is to be opened, or to out_device_num if no output MIDI device is to be opened. The new MidiBus's bus_name will be generated automatically. + * + * @param parent the parent to which this MidiBus is attached. + * @param in_device_num the index of the MIDI input device to be opened. + * @param out_device_num the index of the MIDI output device to be opened. + * @see #addInput(int device_num) + * @see #addInput(String device_name) + * @see #addOutput(int device_num) + * @see #addOutput(String device_name) + * @see #list() + */ + public MidiBus(Object parent, int in_device_num, int out_device_num) { + init(parent, null); + addInput(in_device_num); + addOutput(out_device_num); + } + + /** + * Constructs a new MidiBus with the specified bus_name and registers the specified parent (PApplet or other) for callbacks. Opens the MIDI input and output devices specified by the indexes in_device_num and out_device_num. A value of -1 can be passed to in_device_num if no input MIDI device is to be opened, or to out_device_num if no output MIDI device is to be opened. + * + * @param parent the parent to which this MidiBus is attached. + * @param in_device_num the index of the MIDI input device to be opened. + * @param out_device_num the index of the MIDI output device to be opened. + * @param bus_name the String which which identifies this MidiBus. + * @see #addInput(int device_num) + * @see #addInput(String device_name) + * @see #addOutput(int device_num) + * @see #addOutput(String device_name) + * @see #list() + */ + public MidiBus(Object parent, int in_device_num, int out_device_num, String bus_name) { + init(parent, bus_name); + addInput(in_device_num); + addOutput(out_device_num); + } + + /** + * Constructs a new MidiBus and registers the specified parent (PApplet or other) for callbacks. Opens the MIDI input and output devices specified by the names in_device_name and out_device_name. An empty String can be passed to in_device_name if no input MIDI device is to be opened, or to out_device_name if no output MIDI device is to be opened. The new MidiBus's bus_name will be generated automatically. + *

+ * If two or more MIDI inputs have the same name, whichever appears first when {@link #list()} is called will be added, simlarly for two or more MIDI outputs with the same name. If this behavior is problematic use {@link #MidiBus(Object parent, int in_device_num, int out_device_num)} instead. + * + * @param parent the parent to which this MidiBus is attached. + * @param in_device_name the name of the MIDI input device to be opened. + * @param out_device_name the name of the MIDI output device to be opened. + * @see #addInput(int device_num) + * @see #addInput(String device_name) + * @see #addOutput(int device_num) + * @see #addOutput(String device_name) + * @see #list() + */ + public MidiBus(Object parent, String in_device_name, String out_device_name) { + init(parent, null); + addInput(in_device_name); + addOutput(out_device_name); + } + + /** + * Constructs a new MidiBus with the specified bus_name and registers the specified parent (PApplet or other) for callbacks. Opens the MIDI input and output devices specified by the names out_device_name and out_device_name. An empty String can be passed to in_device_name if no input MIDI device is to be opened, or to out_device_name if no output MIDI device is to be opened. + *

+ * If two or more MIDI inputs have the same name, whichever appears first when {@link #list()} is called will be added, simlarly for two or more MIDI outputs with the same name. If this behavior is problematic use {@link #MidiBus(Object parent, int in_device_num, int out_device_num, String bus_name)} instead. + * + * @param parent the parent to which this MidiBus is attached. + * @param in_device_name the name of the MIDI input device to be opened. + * @param out_device_name the name of the MIDI output device to be opened. + * @param bus_name the String which which identifies this MidiBus. + * @see #addInput(int device_num) + * @see #addInput(String device_name) + * @see #addOutput(int device_num) + * @see #addOutput(String device_name) + * @see #list() + */ + public MidiBus(Object parent, String in_device_name, String out_device_name, String bus_name) { + init(parent, bus_name); + addInput(in_device_name); + addOutput(out_device_name); + } + + /* -- Yet even more delicious constructor flavors -- */ + + /** + * More flavors of constructor, similar to the others, but with mixed arguments + * + * @param parent the parent to which this MidiBus is attached. + * @param in_device_num the name of the MIDI input device to be opened. + * @param out_device_name the name of the MIDI output device to be opened. + * @see #addInput(int device_num) + * @see #addInput(String device_name) + * @see #addOutput(int device_num) + * @see #addOutput(String device_name) + * @see #list() + */ + public MidiBus(Object parent, int in_device_num, String out_device_name) { + init(parent, null); + addInput(in_device_num); + addOutput(out_device_name); + } + + /** + * More flavors of constructor, similar to the others, but with mixed arguments + * + * @param parent the parent to which this MidiBus is attached. + * @param in_device_num the name of the MIDI input device to be opened. + * @param out_device_name the name of the MIDI output device to be opened. + * @param bus_name the String which which identifies this MidiBus. + * @see #addInput(int device_num) + * @see #addInput(String device_name) + * @see #addOutput(int device_num) + * @see #addOutput(String device_name) + * @see #list() + */ + public MidiBus(Object parent, int in_device_num, String out_device_name, String bus_name) { + init(parent, bus_name); + addInput(in_device_num); + addOutput(out_device_name); + } + + /** + * More flavors of constructor, similar to the others, but with mixed arguments + * + * @param parent the parent to which this MidiBus is attached. + * @param in_device_name the name of the MIDI input device to be opened. + * @param out_device_num the name of the MIDI output device to be opened. + * @see #addInput(int device_num) + * @see #addInput(String device_name) + * @see #addOutput(int device_num) + * @see #addOutput(String device_name) + * @see #list() + */ + public MidiBus(Object parent, String in_device_name, int out_device_num) { + init(parent, null); + addInput(in_device_name); + addOutput(out_device_num); + } + + /** + * More flavors of constructor, similar to the others, but with mixed arguments + * + * @param parent the parent to which this MidiBus is attached. + * @param in_device_name the name of the MIDI input device to be opened. + * @param out_device_num the name of the MIDI output device to be opened. + * @param bus_name the String which which identifies this MidiBus. + * @see #addInput(int device_num) + * @see #addInput(String device_name) + * @see #addOutput(int device_num) + * @see #addOutput(String device_name) + * @see #list() + */ + public MidiBus(Object parent, String in_device_name, int out_device_num, String bus_name) { + init(parent, bus_name); + addInput(in_device_name); + addOutput(out_device_num); + } + + /* -- Constructor Functions -- */ + + /** + * Perfoms the initialisation of new MidiBus objects, is private for a reason, and is only ever called within the constructors. This method exists only for the purpose of cleaner and easier to maintain code. + * Creates a new (hopefully/probably) unique bus_name value for new MidiBus objects that weren't given one. + * If two MidiBus object were to have the same name, this would be bad, but not fatal, so there's no point in spending too much time worrying about it. + */ + private void init(Object parent, String bus_name) { + registerParent(parent); + + /* -- */ + + if(bus_name == null) { + generateBusName(); + } else { + this.bus_name = bus_name; + } + + /* -- */ + + input_devices = new Vector(); + output_devices = new Vector(); + + listeners = new Vector(); + + sendTimestamps = true; + } + + /* -- Input/Output Handling -- */ + + /** + * Returns the names of all the attached input devices. + * + * @return the names of the attached inputs. + * @see #attachedOutputs() + */ + public String[] attachedInputs() { + MidiDevice.Info[] devices_info = attachedInputsMidiDeviceInfo(); + String[] devices = new String[devices_info.length]; + + for(int i = 0;i < devices_info.length;i++) { + devices[i] = devices_info[i].getName(); + } + + return devices; + } + + /** + * Returns the names of all the attached output devices. + * + * @return the names of the attached outputs. + * @see #attachedInputs() + */ + public String[] attachedOutputs() { + MidiDevice.Info[] devices_info = attachedOutputsMidiDeviceInfo(); + String[] devices = new String[devices_info.length]; + + for(int i = 0;i < devices_info.length;i++) { + devices[i] = devices_info[i].getName(); + } + + return devices; + } + + /** + * Returns the MidiDevice.Info of all the attached input devices. + * + * @return the MidiDevice.Info of the attached inputs. + */ + MidiDevice.Info[] attachedInputsMidiDeviceInfo() { + MidiDevice.Info[] devices = new MidiDevice.Info[input_devices.size()]; + + for(int i = 0;i < input_devices.size();i++) { + devices[i] = input_devices.get(i).info; + } + + return devices; + } + + /** + * Returns the MidiDevice.Info of all the attached output devices. + * + * @return the MidiDevice.Info of the attached outputs. + */ + MidiDevice.Info[] attachedOutputsMidiDeviceInfo() { + MidiDevice.Info[] devices = new MidiDevice.Info[output_devices.size()]; + + for(int i = 0;i < output_devices.size();i++) { + devices[i] = output_devices.get(i).info; + } + + return devices; + } + + /** + * Adds a new MIDI input device specified by the index device_num. If the MIDI input device has already been added, it will not be added again. + * + * @param device_num the index of the MIDI input device to be added. + * @return true if and only if the input device was successfully added. + * @see #addInput(String device_name) + * @see #list() + */ + public boolean addInput(int device_num) { + if(device_num == -1) return false; + + MidiDevice.Info[] devices = availableInputsMidiDeviceInfo(); + + if(device_num >= devices.length || device_num < 0) { + System.err.println("\nThe MidiBus Warning: The chosen input device numbered ["+device_num+"] was not added because it doesn't exist"); + return false; + } + + return addInput(devices[device_num]); + } + + + /** + * Removes the MIDI input device specified by the index device_num. + * + * @param device_num the index of the MIDI input device to be removed. + * @return true if and only if the input device was successfully removed. + * @see #removeInput(String device_name) + * @see #attachedInputs() + */ + public synchronized boolean removeInput(int device_num) { + try { + InputDeviceContainer container = input_devices.get(device_num); + + input_devices.remove(container); + + container.transmitter.close(); + container.receiver.close(); + + return true; + } catch(ArrayIndexOutOfBoundsException e) { + return false; + } + } + + /** + * Adds a new MIDI input device specified by the name device_name. If the MIDI input device has already been added, it will not be added again. + *

+ * If two or more MIDI inputs have the same name, whichever appears first when {@link #list()} is called will be added. If this behavior is problematic use {@link #addInput(int device_num)} instead. + * + * @param device_name the name of the MIDI input device to be added. + * @return true if and only if the input device was successfully added. + * @see #addInput(int device_num) + * @see #list() + */ + public boolean addInput(String device_name) { + if(device_name.equals("")) return false; + + MidiDevice.Info[] devices = availableInputsMidiDeviceInfo(); + + for(int i = 0;i < devices.length;i++) { + if(devices[i].getName().equals(device_name)) return addInput(devices[i]); + } + + System.err.println("\nThe MidiBus Warning: No available input MIDI devices named: \""+device_name+"\" were found"); + return false; + } + + /** + * Removes the MIDI input device specified by the name device_name. + *

+ * If two or more attached MIDI inputs have the same name, whichever appears first when {@link #attachedInputs()} is called will be removed. If this behavior is problematic use {@link #removeInput(int device_num)} instead. + * + * @param device_name the name of the MIDI input device to be removed. + * @return true if and only if the input device was successfully removed. + * @see #removeInput(int device_num) + * @see #attachedInputs() + */ + public synchronized boolean removeInput(String device_name) { + for(InputDeviceContainer container : input_devices) { + if(container.info.getName().equals(device_name)) { + input_devices.remove(container); + + container.transmitter.close(); + container.receiver.close(); + + return true; + } + } + return false; + } + + /** + * Adds a new MIDI input device specified by the MidiDevice.Info device_info. If the MIDI input device has already been added, it will not be added again. + * + * @param device_info the MidiDevice.Info of the MIDI input device to be added. + * @return true if and only if the input device was successfully added. + */ + synchronized boolean addInput(MidiDevice.Info device_info) { + try { + MidiDevice new_device = MidiSystem.getMidiDevice(device_info); + + if(new_device.getMaxTransmitters() == 0) { + System.err.println("\nThe MidiBus Warning: The chosen input device \""+device_info.getName()+"\" was not added because it is output only"); + return false; + } + + for(InputDeviceContainer container : input_devices) { + if(device_info.getName().equals(container.info.getName())) return false; + } + + if(!new_device.isOpen()) new_device.open(); + + MReceiver receiver = new MReceiver(); + Transmitter transmitter = new_device.getTransmitter(); + transmitter.setReceiver(receiver); + + InputDeviceContainer new_container = new InputDeviceContainer(new_device); + new_container.transmitter = transmitter; + new_container.receiver = receiver; + + input_devices.add(new_container); + + return true; + } catch(MidiUnavailableException e) { + System.err.println("\nThe MidiBus Warning: The chosen input device \""+device_info.getName()+"\" was not added because it is unavailable"); + return false; + } + } + + /** + * Adds a new MIDI output device specified by the index device_num. If the MIDI output device has already been added, it will not be added again. + * + * @param device_num the index of the MIDI output device to be added. + * @return true if and only if the output device was successfully added. + * @see #addOutput(String device_name) + * @see #list() + */ + public boolean addOutput(int device_num) { + if(device_num == -1) return false; + + MidiDevice.Info[] devices = availableOutputsMidiDeviceInfo(); + + if(device_num >= devices.length || device_num < 0) { + System.err.println("\nThe MidiBus Warning: The chosen output device numbered ["+device_num+"] was not added because it doesn't exist"); + return false; + } + + return addOutput(devices[device_num]); + } + + /** + * Removes the MIDI output device specified by the index device_num. + * + * @param device_num the index of the MIDI output device to be removed. + * @return true if and only if the output device was successfully removed. + * @see #removeInput(String device_name) + * @see #attachedOutputs() + */ + public synchronized boolean removeOutput(int device_num) { + try { + OutputDeviceContainer container = output_devices.get(device_num); + + output_devices.remove(container); + + container.receiver.close(); + + return true; + } catch(ArrayIndexOutOfBoundsException e) { + return false; + } + } + + /** + * Adds a new MIDI output device specified by the name device_name. If the MIDI output device has already been added, it will not be added again. + *

+ * If two or more MIDI outputs have the same name, whichever appears first when {@link #list()} is called will be added. If this behavior is problematic use {@link #addOutput(int device_num)} instead. + * + * @param device_name the name of the MIDI output device to be added. + * @return true if and only if the output device was successfully added. + * @see #addOutput(int device_num) + * @see #list() + */ + public boolean addOutput(String device_name) { + if(device_name.equals("")) return false; + + MidiDevice.Info[] devices = availableOutputsMidiDeviceInfo(); + + for(int i = 0;i < devices.length;i++) { + if(devices[i].getName().equals(device_name)) return addOutput(devices[i]); + } + + System.err.println("\nThe MidiBus Warning: No available input MIDI devices named: \""+device_name+"\" were found"); + return false; + } + + /** + * Removes the MIDI output device specified by the name device_name. + *

+ * If two or more attached MIDI outputs have the same name, whichever appears first when {@link #attachedOutputs()} is called will be removed. If this behavior is problematic use {@link #removeOutput(int device_num)} instead. + * + * @param device_name the name of the MIDI output device to be removed. + * @return true if and only if the output device was successfully removed. + * @see #removeOutput(int device_num) + * @see #attachedOutputs() + */ + public synchronized boolean removeOutput(String device_name) { + for(OutputDeviceContainer container : output_devices) { + if(container.info.getName().equals(device_name)) { + output_devices.remove(container); + + container.receiver.close(); + + return true; + } + } + return false; + } + + /** + * Adds a new MIDI output device specified by the MidiDevice.Info device_info. If the MIDI output device has already been added, it will not be added again. + * + * @param device_info the MidiDevice.Info of the MIDI output device to be added. + * @return true if and only if the input device was successfully added. + */ + synchronized boolean addOutput(MidiDevice.Info device_info) { + try { + MidiDevice new_device = MidiSystem.getMidiDevice(device_info); + + if(new_device.getMaxReceivers() == 0) { + System.err.println("\nThe MidiBus Warning: The chosen output device \""+device_info.getName()+"\" was not added because it is input only"); + return false; + } + + for(OutputDeviceContainer container : output_devices) { + if(device_info.getName().equals(container.info.getName())) return false; + } + + if(!new_device.isOpen()) new_device.open(); + + OutputDeviceContainer new_container = new OutputDeviceContainer(new_device); + new_container.receiver = new_device.getReceiver(); + + output_devices.add(new_container); + + return true; + } catch(MidiUnavailableException e) { + System.err.println("\nThe MidiBus Warning: The chosen output device \""+device_info.getName()+"\" was not added because it is unavailable"); + return false; + } + } + + /** + * Closes, clears and disposes of all input related Transmitters and Receivers. + * + * @see #clearOutputs() + * @see #clearAll() + */ + public synchronized void clearInputs() { + //We are purposefully not closing devices here, because in some cases that will be slow, and we might want later + //Also it's broken on MAC + try{ + for(InputDeviceContainer container : input_devices) { + container.transmitter.close(); + container.receiver.close(); + } + } catch(Exception e) { + System.err.println("The MidiBus Warning: Unexpected error during clearInputs()"); + } + + input_devices.clear(); + } + + /** + * Closes, clears and disposes of all output related Receivers. + * + * @see #clearInputs() + * @see #clearAll() + */ + public synchronized void clearOutputs() { + //We are purposefully not closing devices here, because in some cases that will be slow, and we might want later + //Also it's broken on MAC + try{ + for(OutputDeviceContainer container : output_devices) { + container.receiver.close(); + } + } catch(Exception e) { + System.err.println("The MidiBus Warning: Unexpected error during clearOutputs()"); + } + + output_devices.clear(); + } + + /** + * Closes, clears and disposes of all input and output related Transmitters and Receivers. + * + * @see #clearInputs() + * @see #clearOutputs() + */ + public void clearAll() { + clearInputs(); + clearOutputs(); + } + + /** + * Closes all MidiDevices, should only be called when closing the application, will interrupt all MIDI I/O. Call publicly from stop(), close() or dispose() + * + * @see #clearOutputs() + * @see #clearInputs() + * @see #clearAll() + * @see #stop() + * @see #close() + * @see #dispose() + */ + void closeAllMidiDevices() { + if(MidiBus.available_devices == null) findMidiDevices(); + MidiDevice device; + + for(int i = 0;i < MidiBus.available_devices.length;i++) { + try { + device = MidiSystem.getMidiDevice(MidiBus.available_devices[i]); + if(device.isOpen()) device.close(); + } catch(MidiUnavailableException e) { + //Device wasn't available, which is fine since we wanted to close it anyways + } + } + + } + + /* -- MIDI Out -- */ + + /** + * Sends a MIDI message with an unspecified number of bytes. The first byte should be always be the status byte. If the message is a Meta message of a System Exclusive message it can have more than 3 byte, otherwise all extra bytes will be dropped. + * + * @param data the bytes of the MIDI message. + * @see #sendMessage(int status) + * @see #sendMessage(int status, int data) + * @see #sendMessage(int status, int data1, int data2) + * @see #sendMessage(int command, int channel, int data1, int data2) + * @see #sendMessage(MidiMessage message) + * @see #sendNoteOn(int channel, int pitch, int velocity) + * @see #sendNoteOn(Note note) + * @see #sendNoteOff(int channel, int pitch, int velocity) + * @see #sendNoteOff(Note note) + * @see #sendControllerChange(int channel, int number, int value) + * @see #sendControllerChange(ControlChange change) + */ + public void sendMessage(byte[] data) { + if((int)((byte)data[0] & 0xFF) == MetaMessage.META) { + MetaMessage message = new MetaMessage(); + try { + byte[] payload = new byte[data.length-2]; + System.arraycopy(data, 2, payload, 0, data.length-2); + message.setMessage((int)((byte)data[1] & 0xFF), payload, data.length-2); + sendMessage(message); + } catch(InvalidMidiDataException e) { + System.err.println("\nThe MidiBus Warning: Message not sent, invalid MIDI data"); + } + } else if((int)((byte)data[0] & 0xFF) == SysexMessage.SYSTEM_EXCLUSIVE || (int)((byte)data[0] & 0xFF) == SysexMessage.SPECIAL_SYSTEM_EXCLUSIVE) { + SysexMessage message = new SysexMessage(); + try { + message.setMessage(data, data.length); + sendMessage(message); + } catch(InvalidMidiDataException e) { + System.err.println("\nThe MidiBus Warning: Message not sent, invalid MIDI data"); + } + } else { + ShortMessage message = new ShortMessage(); + try { + if(data.length > 2) message.setMessage((int)((byte)data[0] & 0xFF), (int)((byte)data[1] & 0xFF), (int)((byte)data[2] & 0xFF)); + else if(data.length > 1) message.setMessage((int)((byte)data[0] & 0xFF), (int)((byte)data[1] & 0xFF), 0); + else message.setMessage((int)((byte)data[0] & 0xFF)); + sendMessage(message); + } catch(InvalidMidiDataException e) { + System.err.println("\nThe MidiBus Warning: Message not sent, invalid MIDI data"); + } + } + } + + /** + * Sends a MIDI message that takes no data bytes. + * + * @param status the status byte + * @see #sendMessage(byte[] data) + * @see #sendMessage(int status, int data) + * @see #sendMessage(int status, int data1, int data2) + * @see #sendMessage(int command, int channel, int data1, int data2) + * @see #sendMessage(MidiMessage message) + * @see #sendNoteOn(int channel, int pitch, int velocity) + * @see #sendNoteOn(Note note) + * @see #sendNoteOff(int channel, int pitch, int velocity) + * @see #sendNoteOff(Note note) + * @see #sendControllerChange(int channel, int number, int value) + * @see #sendControllerChange(ControlChange change) + */ + public void sendMessage(int status) { + ShortMessage message = new ShortMessage(); + try { + message.setMessage(status); + sendMessage(message); + } catch(InvalidMidiDataException e) { + System.out.println(e); + System.err.println("\nThe MidiBus Warning: Message not sent, invalid MIDI data"); + } + } + + /** + * Sends a MIDI message that takes only one data byte. If the message does not take data, the data byte is ignored. + * + * @param status the status byte + * @param data the data byte + * @see #sendMessage(byte[] data) + * @see #sendMessage(int status) + * @see #sendMessage(int status, int data1, int data2) + * @see #sendMessage(int command, int channel, int data1, int data2) + * @see #sendMessage(MidiMessage message) + * @see #sendNoteOn(int channel, int pitch, int velocity) + * @see #sendNoteOn(Note note) + * @see #sendNoteOff(int channel, int pitch, int velocity) + * @see #sendNoteOff(Note note) + * @see #sendControllerChange(int channel, int number, int value) + * @see #sendControllerChange(ControlChange change) + */ + public void sendMessage(int status, int data) { + sendMessage(status, data, 0); + } + + /** + * Sends a MIDI message that takes one or two data bytes. If the message takes only one data byte, the second data byte is ignored; if the message does not take any data bytes, both data bytes are ignored. + * + * @param status the status byte. + * @param data1 the first data byte. + * @param data2 the second data byte. + * @see #sendMessage(byte[] data) + * @see #sendMessage(int status) + * @see #sendMessage(int status, int data) + * @see #sendMessage(int command, int channel, int data1, int data2) + * @see #sendMessage(MidiMessage message) + * @see #sendNoteOn(int channel, int pitch, int velocity) + * @see #sendNoteOn(Note note) + * @see #sendNoteOff(int channel, int pitch, int velocity) + * @see #sendNoteOff(Note note) + * @see #sendControllerChange(int channel, int number, int value) + * @see #sendControllerChange(ControlChange change) + */ + public void sendMessage(int status, int data1, int data2) { + ShortMessage message = new ShortMessage(); + try { + message.setMessage(status, data1, data2); + sendMessage(message); + } catch(InvalidMidiDataException e) { + System.err.println("\nThe MidiBus Warning: Message not sent, invalid MIDI data"); + } + } + + /** + * Sends a channel message which takes up to two data bytes. If the message only takes one data byte, the second data byte is ignored; if the message does not take any data bytes, both data bytes are ignored. + * + * @param command the MIDI command represented by this message. + * @param channel the channel associated with the message. + * @param data1 the first data byte. + * @param data2 the second data byte. + * @see #sendMessage(byte[] data) + * @see #sendMessage(int status) + * @see #sendMessage(int status, int data) + * @see #sendMessage(int status, int data1, int data2) + * @see #sendMessage(MidiMessage message) + * @see #sendNoteOn(int channel, int pitch, int velocity) + * @see #sendNoteOn(Note note) + * @see #sendNoteOff(int channel, int pitch, int velocity) + * @see #sendNoteOff(Note note) + * @see #sendControllerChange(int channel, int number, int value) + * @see #sendControllerChange(ControlChange change) + */ + public void sendMessage(int command, int channel, int data1, int data2) { + ShortMessage message = new ShortMessage(); + try { + message.setMessage(command, channel, data1, data2); + sendMessage(message); + } catch(InvalidMidiDataException e) { + System.err.println("\nThe MidiBus Warning: Message not sent, invalid MIDI data"); + } + } + + /** + * Sends a MidiMessage object. + * + * @param message the MidiMessage. + * @see #sendMessage(byte[] data) + * @see #sendMessage(int status) + * @see #sendMessage(int status, int data) + * @see #sendMessage(int status, int data1, int data2) + * @see #sendMessage(int command, int channel, int data1, int data2) + * @see #sendNoteOn(int channel, int pitch, int velocity) + * @see #sendNoteOn(Note note) + * @see #sendNoteOff(int channel, int pitch, int velocity) + * @see #sendNoteOff(Note note) + * @see #sendControllerChange(int channel, int number, int value) + * @see #sendControllerChange(ControlChange change) + */ + public synchronized void sendMessage(MidiMessage message) { + for(OutputDeviceContainer container : output_devices) { + if(sendTimestamps) container.receiver.send(message, System.currentTimeMillis()); + else container.receiver.send(message, 0); + } + } + + /** + * Sends a NoteOn message to a channel with the specified pitch and velocity. + * + * @param channel the channel associated with the message. + * @param pitch the pitch associated with the message. + * @param velocity the velocity associated with the message. + * @see #sendMessage(byte[] data) + * @see #sendMessage(int status) + * @see #sendMessage(int status, int data) + * @see #sendMessage(int status, int data1, int data2) + * @see #sendMessage(int command, int channel, int data1, int data2) + * @see #sendMessage(MidiMessage message) + * @see #sendNoteOn(Note note) + * @see #sendNoteOff(int channel, int pitch, int velocity) + * @see #sendNoteOff(Note note) + * @see #sendControllerChange(int channel, int number, int value) + * @see #sendControllerChange(ControlChange change) + * + */ + public void sendNoteOn(int channel, int pitch, int velocity) { + ShortMessage message = new ShortMessage(); + try { + message.setMessage(ShortMessage.NOTE_ON, constrain(channel,0,15), constrain(pitch,0,127), constrain(velocity,0,127)); + sendMessage(message); + } catch(InvalidMidiDataException e) { + System.err.println("\nThe MidiBus Warning: Message not sent, invalid MIDI data"); + } + } + + /** + * Sends a NoteOn message to a channel with the specified Note. + * + * @param note the Note object for the message. + * @see #sendMessage(byte[] data) + * @see #sendMessage(int status) + * @see #sendMessage(int status, int data) + * @see #sendMessage(int status, int data1, int data2) + * @see #sendMessage(int command, int channel, int data1, int data2) + * @see #sendMessage(MidiMessage message) + * @see #sendNoteOn(int channel, int pitch, int velocity) + * @see #sendNoteOff(int channel, int pitch, int velocity) + * @see #sendNoteOff(Note note) + * @see #sendControllerChange(int channel, int number, int value) + * @see #sendControllerChange(ControlChange change) + */ + public void sendNoteOn(Note note) { + sendNoteOn(note.channel(), note.pitch(), note.velocity()); + } + + /** + * Sends a NoteOff message to a channel with the specified pitch and velocity. + * + * @param channel the channel associated with the message. + * @param pitch the pitch associated with the message. + * @param velocity the velocity associated with the message. + * @see #sendMessage(byte[] data) + * @see #sendMessage(int status) + * @see #sendMessage(int status, int data) + * @see #sendMessage(int status, int data1, int data2) + * @see #sendMessage(int command, int channel, int data1, int data2) + * @see #sendMessage(MidiMessage message) + * @see #sendNoteOn(int channel, int pitch, int velocity) + * @see #sendNoteOn(Note note) + * @see #sendNoteOff(Note note) + * @see #sendControllerChange(int channel, int number, int value) + * @see #sendControllerChange(ControlChange change) + */ + public void sendNoteOff(int channel, int pitch, int velocity) { + ShortMessage message = new ShortMessage(); + try { + message.setMessage(ShortMessage.NOTE_OFF, constrain(channel,0,15), constrain(pitch,0,127), constrain(velocity,0,127)); + sendMessage(message); + } catch(InvalidMidiDataException e) { + System.err.println("\nThe MidiBus Warning: Message not sent, invalid MIDI data"); + } + } + + /** + * Sends a NoteOff message to a channel with the specified Note. + * + * @param note the Note object for the message. + * @see #sendMessage(byte[] data) + * @see #sendMessage(int status) + * @see #sendMessage(int status, int data) + * @see #sendMessage(int status, int data1, int data2) + * @see #sendMessage(int command, int channel, int data1, int data2) + * @see #sendMessage(MidiMessage message) + * @see #sendNoteOn(int channel, int pitch, int velocity) + * @see #sendNoteOn(Note note) + * @see #sendNoteOff(int channel, int pitch, int velocity) + * @see #sendControllerChange(int channel, int number, int value) + * @see #sendControllerChange(ControlChange change) + */ + public void sendNoteOff(Note note) { + sendNoteOff(note.channel, note.pitch(), note.velocity()); + } + + /** + * Sends a ControllerChange message to a channel with the specified number and value. + * + * @param channel the channel associated with the message. + * @param number the number associated with the message. + * @param value the value associated with the message. + * @see #sendMessage(byte[] data) + * @see #sendMessage(int status) + * @see #sendMessage(int status, int data) + * @see #sendMessage(int status, int data1, int data2) + * @see #sendMessage(int command, int channel, int data1, int data2) + * @see #sendMessage(MidiMessage message) + * @see #sendNoteOn(int channel, int pitch, int velocity) + * @see #sendNoteOn(Note note) + * @see #sendNoteOff(int channel, int pitch, int velocity) + * @see #sendNoteOff(Note note) + * @see #sendControllerChange(ControlChange change) + */ + public void sendControllerChange(int channel, int number, int value) { + ShortMessage message = new ShortMessage(); + try { + message.setMessage(ShortMessage.CONTROL_CHANGE, constrain(channel,0,15), constrain(number,0,127), constrain(value,0,127)); + sendMessage(message); + } catch(InvalidMidiDataException e) { + System.err.println("\nThe MidiBus Warning: Message not sent, invalid MIDI data"); + } + } + + /** + * Sends a ControllerChange message to a channel with the specified ControlChange. + * + * @param change the ControlChange object for the message. + * @see #sendMessage(byte[] data) + * @see #sendMessage(int status) + * @see #sendMessage(int status, int data) + * @see #sendMessage(int status, int data1, int data2) + * @see #sendMessage(int command, int channel, int data1, int data2) + * @see #sendMessage(MidiMessage message) + * @see #sendNoteOn(int channel, int pitch, int velocity) + * @see #sendNoteOn(Note note) + * @see #sendNoteOff(int channel, int pitch, int velocity) + * @see #sendNoteOff(Note note) + * @see #sendControllerChange(int channel, int number, int value) + */ + public void sendControllerChange(ControlChange change) { + sendControllerChange(change.channel(), change.number(), change.value()); + } + + /* -- MIDI In -- */ + + /** + * Notifies all types of listeners of a new MIDI message from one of the MIDI input devices. + * + * @param message the new inbound MidiMessage. + */ + void notifyListeners(MidiMessage message, long timeStamp) { + byte[] data = message.getMessage(); + + for(MidiListener listener : listeners) { + + /* -- RawMidiListener -- */ + + if(listener instanceof RawMidiListener) ((RawMidiListener)listener).rawMidiMessage(data); + + /* -- SimpleMidiListener -- */ + + if(listener instanceof SimpleMidiListener) { + if((int)((byte)data[0] & 0xF0) == ShortMessage.NOTE_ON) { + ((SimpleMidiListener)listener).noteOn((int)(data[0] & 0x0F),(int)(data[1] & 0xFF),(int)(data[2] & 0xFF)); + } else if((int)((byte)data[0] & 0xF0) == ShortMessage.NOTE_OFF) { + ((SimpleMidiListener)listener).noteOff((int)(data[0] & 0x0F),(int)(data[1] & 0xFF),(int)(data[2] & 0xFF)); + } else if((int)((byte)data[0] & 0xF0) == ShortMessage.CONTROL_CHANGE) { + ((SimpleMidiListener)listener).controllerChange((int)(data[0] & 0x0F),(int)(data[1] & 0xFF),(int)(data[2] & 0xFF)); + } + } + + /* -- StandardMidiListener -- */ + + if(listener instanceof StandardMidiListener) ((StandardMidiListener)listener).midiMessage(message, timeStamp); + + /* -- ObjectMidiListener -- */ + + if(listener instanceof ObjectMidiListener) { + if((int)((byte)data[0] & 0xF0) == ShortMessage.NOTE_ON) { + ((ObjectMidiListener)listener).noteOn(new Note((int)(data[0] & 0x0F),(int)(data[1] & 0xFF),(int)(data[2] & 0xFF))); + } else if((int)((byte)data[0] & 0xF0) == ShortMessage.NOTE_OFF) { + ((ObjectMidiListener)listener).noteOff(new Note((int)(data[0] & 0x0F),(int)(data[1] & 0xFF),(int)(data[2] & 0xFF))); + } else if((int)((byte)data[0] & 0xF0) == ShortMessage.CONTROL_CHANGE) { + ((ObjectMidiListener)listener).controllerChange(new ControlChange((int)(data[0] & 0x0F),(int)(data[1] & 0xFF),(int)(data[2] & 0xFF))); + } + } + + } + } + + /** + * Notifies any of the supported methods implemented inside the parent of a new MIDI message from one of the MIDI input devices. + * + * @param message the new inbound MidiMessage. + */ + void notifyParent(MidiMessage message, long timeStamp) { + if(parent == null) return; + + byte[] data = message.getMessage(); + + if((int)((byte)data[0] & 0xF0) == ShortMessage.NOTE_ON) { + if(method_note_on != null) { + try { + method_note_on.invoke(parent, new Object[] { (int)(data[0] & 0x0F), (int)(data[1] & 0xFF), (int)(data[2] & 0xFF) }); + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Disabling noteOn(int channel, int pitch, int velocity) because an unkown exception was thrown and caught"); + e.printStackTrace(); + method_note_on = null; + } + + } + if(method_note_on_with_bus_name != null) { + try { + method_note_on_with_bus_name.invoke(parent, new Object[] { (int)(data[0] & 0x0F), (int)(data[1] & 0xFF), (int)(data[2] & 0xFF), timeStamp, bus_name }); + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Disabling noteOn(int channel, int pitch, int velocity, String bus_name) with bus_name because an unkown exception was thrown and caught"); + e.printStackTrace(); + method_note_on_with_bus_name = null; + } + } + if(method_note_on_wcla != null){ + try { + method_note_on_wcla.invoke(parent, new Note((int)(data[0] & 0x0F), (int)(data[1] & 0xFF), (int)(data[2] & 0xFF), timeStamp, bus_name)); + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Disabling noteOn(Note note) because an unkown exception was thrown and caught"); + e.printStackTrace(); + method_note_on_wcla = null; + } + } + } else if((int)((byte)data[0] & 0xF0) == ShortMessage.NOTE_OFF) { + if(method_note_off != null) { + try { + method_note_off.invoke(parent, new Object[] { (int)(data[0] & 0x0F), (int)(data[1] & 0xFF), (int)(data[2] & 0xFF) }); + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Disabling noteOff(int channel, int pitch, int velocity) because an unkown exception was thrown and caught"); + e.printStackTrace(); + method_note_off = null; + } + } + if(method_note_off_with_bus_name != null) { + try { + method_note_off_with_bus_name.invoke(parent, new Object[] { (int)(data[0] & 0x0F), (int)(data[1] & 0xFF), (int)(data[2] & 0xFF), timeStamp, bus_name }); + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Disabling noteOff(int channel, int pitch, int velocity, String bus_name) with bus_name because an unkown exception was thrown and caught"); + e.printStackTrace(); + method_note_off_with_bus_name = null; + } + } + if(method_note_off_wcla != null){ + try { + method_note_off_wcla.invoke(parent, new Note((int)(data[0] & 0x0F), (int)(data[1] & 0xFF), (int)(data[2] & 0xFF), timeStamp, bus_name)); + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Disabling noteOff(Note note) because an unkown exception was thrown and caught"); + e.printStackTrace(); + method_note_off_wcla = null; + } + } + } else if((int)((byte)data[0] & 0xF0) == ShortMessage.CONTROL_CHANGE) { + if(method_controller_change != null) { + try { + method_controller_change.invoke(parent, new Object[] { (int)(data[0] & 0x0F), (int)(data[1] & 0xFF), (int)(data[2] & 0xFF) }); + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Disabling controllerChange(int channel, int number, int value) because an unkown exception was thrown and caught"); + e.printStackTrace(); + method_controller_change = null; + } + } + if(method_controller_change_with_bus_name != null) { + try { + method_controller_change_with_bus_name.invoke(parent, new Object[] { (int)(data[0] & 0x0F), (int)(data[1] & 0xFF), (int)(data[2] & 0xFF), timeStamp, bus_name }); + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Disabling controllerChange(int channel, int number, int value, String bus_name) with bus_name because an unkown exception was thrown and caught"); + e.printStackTrace(); + method_controller_change_with_bus_name = null; + } + } + if(method_controller_change_wcla != null){ + try { + method_controller_change_wcla.invoke(parent, new ControlChange((int)(data[0] & 0x0F), (int)(data[1] & 0xFF), (int)(data[2] & 0xFF), timeStamp, bus_name)); + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Disabling noteOff(Note note) because an unkown exception was thrown and caught"); + e.printStackTrace(); + method_controller_change_wcla = null; + } + } + } + + if(method_raw_midi != null) { + try { + method_raw_midi.invoke(parent, new Object[] { data }); + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Disabling rawMidi(byte[] data) because an unkown exception was thrown and caught"); + e.printStackTrace(); + method_raw_midi = null; + } + } + if(method_raw_midi_with_bus_name != null) { + try { + method_raw_midi_with_bus_name.invoke(parent, new Object[] { data, timeStamp, bus_name }); + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Disabling rawMidi(byte[] data, String bus_name) with bus_name because an unkown exception was thrown and caught"); + e.printStackTrace(); + method_raw_midi_with_bus_name = null; + } + } + + if(method_midi_message != null) { + try { + method_midi_message.invoke(parent, new Object[] { message }); + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Disabling midiMessage(MidiMessage message) because an unkown exception was thrown and caught"); + e.printStackTrace(); + method_midi_message = null; + } + } + if(method_midi_message_with_bus_name != null) { + try { + method_midi_message_with_bus_name.invoke(parent, new Object[] { message, timeStamp, bus_name }); + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Disabling midiMessage(MidiMessage message, String bus_name) with bus_name because an unkown exception was thrown and caught"); + e.printStackTrace(); + method_midi_message_with_bus_name = null; + } + } + + } + + /* -- Listener Handling -- */ + + /** + * Registers an Object as the parent in order to recieve method callbacks as per {@link PApplet}. Calling this will replace the previous parent Object if any was set. + * + * @param parent the object to register. + * @return the previous parent object if any was set. + * @see #addMidiListener(MidiListener listener) + */ + public Object registerParent(Object parent) { + Object old_parent = this.parent; + + if(old_parent != null) { + method_note_on = null; + method_note_off = null; + method_controller_change = null; + method_raw_midi = null; + method_midi_message = null; + + method_note_on_with_bus_name = null; + method_note_off_with_bus_name = null; + method_controller_change_with_bus_name = null; + method_raw_midi_with_bus_name = null; + method_midi_message_with_bus_name = null; + } + + this.parent = parent; + + if(parent != null) { + + if(parent instanceof processing.core.PApplet) { + ((processing.core.PApplet) parent).registerMethod("dispose", this); + } + + try { + method_note_on = parent.getClass().getMethod("noteOn", new Class[] { Integer.TYPE, Integer.TYPE, Integer.TYPE }); + } catch(Exception e) { + // no such method, or an error.. which is fine, just ignore + } + + try { + method_note_off = parent.getClass().getMethod("noteOff", new Class[] { Integer.TYPE, Integer.TYPE, Integer.TYPE }); + } catch(Exception e) { + // no such method, or an error.. which is fine, just ignore + } + + try { + method_controller_change = parent.getClass().getMethod("controllerChange", new Class[] { Integer.TYPE, Integer.TYPE, Integer.TYPE }); + } catch(Exception e) { + // no such method, or an error.. which is fine, just ignore + } + + try { + method_raw_midi = parent.getClass().getMethod("rawMidi", new Class[] { byte[].class }); + } catch(Exception e) { + // no such method, or an error.. which is fine, just ignore + } + + try { + method_midi_message = parent.getClass().getMethod("midiMessage", new Class[] { MidiMessage.class }); + } catch(Exception e) { + // no such method, or an error.. which is fine, just ignore + } + + try { + method_note_on_with_bus_name = parent.getClass().getMethod("noteOn", new Class[] { Integer.TYPE, Integer.TYPE, Integer.TYPE, Long.TYPE, String.class }); + } catch(Exception e) { + // no such method, or an error.. which is fine, just ignore + } + + try { + method_note_off_with_bus_name = parent.getClass().getMethod("noteOff", new Class[] { Integer.TYPE, Integer.TYPE, Integer.TYPE, Long.TYPE, String.class }); + } catch(Exception e) { + // no such method, or an error.. which is fine, just ignore + } + + try { + method_controller_change_with_bus_name = parent.getClass().getMethod("controllerChange", new Class[] { Integer.TYPE, Integer.TYPE, Integer.TYPE, Long.TYPE, String.class }); + } catch(Exception e) { + // no such method, or an error.. which is fine, just ignore + } + + try { + method_raw_midi_with_bus_name = parent.getClass().getMethod("rawMidi", new Class[] { byte[].class, Long.TYPE, String.class }); + } catch(Exception e) { + // no such method, or an error.. which is fine, just ignore + } + + try { + method_midi_message_with_bus_name = parent.getClass().getMethod("midiMessage", new Class[] { MidiMessage.class, Long.TYPE, String.class }); + } catch(Exception e) { + // no such method, or an error.. which is fine, just ignore + } + + try { + method_note_on_wcla = parent.getClass().getMethod("noteOn", new Class[] { Note.class}); + } catch(Exception e) { + // no such method, or an error.. which is fine, just ignore + } + + try { + method_note_off_wcla = parent.getClass().getMethod("noteOff", new Class[] { Note.class }); + } catch(Exception e) { + // no such method, or an error.. which is fine, just ignore + } + + try { + method_controller_change_wcla = parent.getClass().getMethod("controllerChange", new Class[] { ControlChange.class }); + } catch(Exception e) { + // no such method, or an error.. which is fine, just ignore + } + + } + + return old_parent; + } + + /** + * Adds a listener who will be notified each time a new MIDI message is received from a MIDI input device. If the listener has already been added, it will not be added again. + * + * @param listener the listener to add. + * @return true if and only the listener was sucessfully added. + * @see #removeMidiListener(MidiListener listener) + * @see #registerParent(Object parent) + */ + public boolean addMidiListener(MidiListener listener) { + for(MidiListener current : listeners) if(current == listener) return false; + + listeners.add(listener); + + return true; + } + + /** + * Removes a given listener. + * + * @param listener the listener to remove. + * @return true if and only the listener was sucessfully removed. + * @see #addMidiListener(MidiListener listener) + */ + public boolean removeMidiListener(MidiListener listener) { + for(MidiListener current : listeners) { + if(current == listener) { + listeners.remove(listener); + return true; + } + } + return false; + } + + + /* -- Utilites -- */ + + /** + * It's just convient ... move along... + */ + int constrain(int value, int min, int max) { + if(value > max) value = max; + if(value < min) value = min; + return value; + } + + /** + * Returns whether this MidiBus is sending timestamps along with MIDI information to the MIDI subsystem. + * + * @return true if this MidiBus is sending timestamps. + */ + public boolean sendTimestamps() { + return sendTimestamps; + } + + /** + * Configure this MidiBus instance to send or not to send timestamps along with MIDI information to the MIDI subsystem. + * + * @param sendTimestamps set to true if you want timestamps to be sent, otherwise set to false. + */ + public void sendTimestamps(boolean sendTimestamps) { + this.sendTimestamps = sendTimestamps; + } + + /** + * Returns the name of this MidiBus. + * + * @return the name of this MidiBus. + * @see #setBusName(String bus_name) + * @see #generateBusName() + */ + public String getBusName() { + return bus_name; + } + + /** + * Changes the name of this MidiBus. + * + * @param bus_name the new name of this MidiBus. + * @see #getBusName() + * @see #generateBusName() + */ + public void setBusName(String bus_name) { + this.bus_name = bus_name; + } + + /** + * Generate a name for this MidiBus instance. + * + * @see #setBusName(String bus_name) + * @see #getBusName() + */ + public void generateBusName() { + String id = new Formatter().format("%08d", System.currentTimeMillis()%100000000).toString(); + bus_name = "MidiBus_"+id; + } + + /* -- Object -- */ + + /** + * Returns a string representation of the object. + * + * @return a string representation of the object. + */ + public String toString() { + String output = "MidiBus: "+bus_name+" ["; + output += input_devices.size()+" input(s), "; + output += output_devices.size()+" output(s), "; + output += listeners.size()+" listener(s)]"; + return output; + } + + /** + * Indicates whether some other object is "equal to" this one. + * + * @param obj the reference object with which to compare. + * @return if this object is the same as the obj argument; false otherwise. + */ + public boolean equals(Object obj) { + if(obj instanceof MidiBus) { + MidiBus midibus = (MidiBus)obj; + if(!this.getBusName().equals(midibus.getBusName())) return false; + if(!this.input_devices.equals(midibus.input_devices)) return false; + if(!this.output_devices.equals(midibus.output_devices)) return false; + if(!this.listeners.equals(midibus.listeners)) return false; + return true; + } + return false; + } + + /** + * Creates and returns a copy of this object. + * + * @return a clone of this instance. + */ + public MidiBus clone() { + MidiBus clone = new MidiBus(parent, bus_name); + + for(InputDeviceContainer container : input_devices) { + clone.addInput(container.info); + } + + for(OutputDeviceContainer container : output_devices) { + clone.addOutput(container.info); + } + + for(MidiListener listener : listeners) { + clone.addMidiListener(listener); + } + + return clone; + } + + /** + * Returns a hash code value for the object. + * + * @return a hash code value for this object. + */ + public int hashCode() { + return bus_name.hashCode()+input_devices.hashCode()+output_devices.hashCode()+listeners.hashCode(); + } + + /** + * Override the finalize() method from java.lang.Object. + * + */ + protected void finalize() { + close(); + } + + /* -- Shutting Down -- */ + + /** + * Closes this MidiBus and all connections it has with other MIDI devices. This method exists as per standard javax.sound.midi syntax. It is functionaly equivalent to stop() and dispose(). + * + * @see #stop() + * @see #dispose() + */ + public void close() { + closeAllMidiDevices(); + } + + /** + * Closes this MidiBus and all connections it has with other MIDI devices. This method exit as per standard Processing syntax for users who are doing their sketch cleanup themselves using the stop() function. It is functionaly equivalent to close() and dispose(). + * + * @see #close() + * @see #dispose() + */ + public void stop() { + close(); + } + + /** + * Closes this MidiBus and all connections it has with other MIDI devices. This method exit as per standard Processing library syntax and is called automatically whenever the parent applet shuts down. It is functionaly equivalent to close() and stop(). + * + * @see #close() + * @see #stop() + */ + public void dispose() { + close(); + } + + /* -- Static methods -- */ + + /** + * List all installed MIDI devices. The index, name and type (input/output/unavailable) of each devices will be indicated. + * + * @see #availableInputs() + * @see #availableOutputs() + * @see #unavailableDevices() + */ + static public void list() { + String[] available_inputs = availableInputs(); + String[] available_outputs = availableOutputs(); + String[] unavailable = unavailableDevices(); + + if(available_inputs.length == 0 && available_outputs.length == 0 && unavailable.length == 0) return; + + System.out.println("\nAvailable MIDI Devices:"); + if(available_inputs.length != 0) { + System.out.println("----------Input----------"); + for(int i = 0;i < available_inputs.length;i++) System.out.println("["+i+"] \""+available_inputs[i]+"\""); + } + if(available_outputs.length != 0) { + System.out.println("----------Output----------"); + for(int i = 0;i < available_outputs.length;i++) System.out.println("["+i+"] \""+available_outputs[i]+"\""); + } + if(unavailable.length != 0) { + System.out.println("----------Unavailable----------"); + for(int i = 0;i < unavailable.length;i++) System.out.println("["+i+"] \""+unavailable[i]+"\""); + } + } + + /** + * Rescan for Midi Devices. This is autocalled once when the MidiBus starts up. It should be called again if you need to refresh the list of available MidiDevices while your program is running. + * + */ + static public void findMidiDevices() { + MidiBus.available_devices = MidiSystem.getMidiDeviceInfo(); + } + + /** + * Returns the names of all the available input devices. + * + * @return the names of the available inputs. + * @see #list() + * @see #availableOutputs() + * @see #unavailableDevices() + */ + static public String[] availableInputs() { + MidiDevice.Info[] devices_info = availableInputsMidiDeviceInfo(); + String[] devices = new String[devices_info.length]; + + for(int i = 0;i < devices_info.length;i++) { + devices[i] = devices_info[i].getName(); + } + + return devices; + } + + /** + * Returns the names of all the available output devices. + * + * @return the names of the available outputs. + * @see #list() + * @see #availableInputs() + * @see #unavailableDevices() + */ + static public String[] availableOutputs() { + MidiDevice.Info[] devices_info = availableOutputsMidiDeviceInfo(); + String[] devices = new String[devices_info.length]; + + for(int i = 0;i < devices_info.length;i++) { + devices[i] = devices_info[i].getName(); + } + + return devices; + } + + /** + * Returns the names of all the unavailable devices. + * + * @return the names of the unavailable devices. + * @see #list() + * @see #availableInputs() + * @see #availableOutputs() + */ + static public String[] unavailableDevices() { + MidiDevice.Info[] devices_info = unavailableMidiDeviceInfo(); + String[] devices = new String[devices_info.length]; + + for(int i = 0;i < devices_info.length;i++) { + devices[i] = devices_info[i].getName(); + } + + return devices; + } + + /** + * Returns the MidiDevice.Info of all the available input devices. + * + * @return the MidiDevice.Info of the available inputs. + */ + static MidiDevice.Info[] availableInputsMidiDeviceInfo() { + if(MidiBus.available_devices == null) findMidiDevices(); + MidiDevice device; + + Vector devices_list = new Vector(); + + for(int i = 0;i < MidiBus.available_devices.length;i++) { + try { + device = MidiSystem.getMidiDevice(MidiBus.available_devices[i]); + //This open close checks to make sure the announced device is truely available + //There are many reports on Windows that some devices lie about their availability + //(For instance the Microsoft GS Wavetable Synth) + //But in theory I guess this could happen on any OS, so I'll just do it all the time. + // if(!device.isOpen()) { + // device.open(); + // device.close(); + // } + if (device.getMaxTransmitters() != 0) devices_list.add(MidiBus.available_devices[i]); + } catch(MidiUnavailableException e) { + //Device was unavailable which is fine, we only care about available inputs + } + } + + MidiDevice.Info[] devices = new MidiDevice.Info[devices_list.size()]; + + devices_list.toArray(devices); + + return devices; + } + + /** + * Returns the MidiDevice.Info of all the available output devices. + * + * @return the MidiDevice.Info of the available output. + */ + static MidiDevice.Info[] availableOutputsMidiDeviceInfo() { + if(MidiBus.available_devices == null) findMidiDevices(); + MidiDevice device; + + Vector devices_list = new Vector(); + + for(int i = 0;i < MidiBus.available_devices.length;i++) { + try { + device = MidiSystem.getMidiDevice(MidiBus.available_devices[i]); + //This open close checks to make sure the announced device is truely available + //There are many reports on Windows that some devices lie about their availability + //(For instance the Microsoft GS Wavetable Synth) + //But in theory I guess this could happen on any OS, so I'll just do it all the time. + // if(!device.isOpen()) { + // device.open(); + // device.close(); + // } + if (device.getMaxReceivers() != 0) devices_list.add(MidiBus.available_devices[i]); + } catch(MidiUnavailableException e) { + //Device was unavailable which is fine, we only care about available output + } + } + + MidiDevice.Info[] devices = new MidiDevice.Info[devices_list.size()]; + + devices_list.toArray(devices); + + return devices; + } + + /** + * Returns the MidiDevice.Info of all the unavailable devices. + * + * @return the MidiDevice.Info of the unavailable devices. + */ + static MidiDevice.Info[] unavailableMidiDeviceInfo() { + if(MidiBus.available_devices == null) findMidiDevices(); + MidiDevice device; + + Vector devices_list = new Vector(); + + for(int i = 0;i < MidiBus.available_devices.length;i++) { + try { + device = MidiSystem.getMidiDevice(MidiBus.available_devices[i]); + //This open close checks to make sure the announced device is truely available + //There are many reports on Windows that some devices lie about their availability + //(For instance the Microsoft GS Wavetable Synth) + //But in theory I guess this could happen on any OS, so I'll just do it all the time. + // if(!device.isOpen()) { + // device.open(); + // device.close(); + // } + } catch(MidiUnavailableException e) { + devices_list.add(MidiBus.available_devices[i]); + } + } + + MidiDevice.Info[] devices = new MidiDevice.Info[devices_list.size()]; + + devices_list.toArray(devices); + + return devices; + } + + /* -- Nested Classes -- */ + + private class MReceiver implements Receiver { + + MReceiver() { + + } + + public void close() { + + } + + public void send(MidiMessage message, long timeStamp) { + + if(message.getStatus() == ShortMessage.NOTE_ON && message.getMessage()[2] == 0) { + try { + ShortMessage tmp_message = (ShortMessage)message; + tmp_message.setMessage(ShortMessage.NOTE_OFF, tmp_message.getData1(), tmp_message.getData2()); + message = tmp_message; + } catch(Exception e) { + System.err.println("\nThe MidiBus Warning: Mystery error during noteOn (0 velocity) to noteOff conversion"); + } + } + + notifyListeners(message, timeStamp); + notifyParent(message, timeStamp); + } + + } + + private class InputDeviceContainer { + + MidiDevice.Info info; + + Transmitter transmitter; + Receiver receiver; + + InputDeviceContainer(MidiDevice device) { + this.info = device.getDeviceInfo(); + } + + public boolean equals(Object container) { + if(container instanceof InputDeviceContainer && ((InputDeviceContainer)container).info.getName().equals(this.info.getName())) return true; + else return false; + } + + public int hashCode() { + return info.getName().hashCode(); + } + + } + + private class OutputDeviceContainer { + + MidiDevice.Info info; + + Receiver receiver; + + OutputDeviceContainer(MidiDevice device) { + this.info = device.getDeviceInfo(); + } + + public boolean equals(Object container) { + if(container instanceof OutputDeviceContainer && ((OutputDeviceContainer)container).info.getName().equals(this.info.getName())) return true; + else return false; + } + + public int hashCode() { + return info.getName().hashCode(); + } + + } + +} \ No newline at end of file diff --git a/libraries/themidibus/src/themidibus/MidiListener.java b/libraries/themidibus/src/themidibus/MidiListener.java new file mode 100644 index 0000000..a0032e9 --- /dev/null +++ b/libraries/themidibus/src/themidibus/MidiListener.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2009 Severin Smith + * + * This file is part of a library called The MidiBus (themidibus) - http://www.smallbutdigital.com/themidibus.php. + * + * The MidiBus is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The MidiBus is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the MidiBus. If not, see . +*/ + +package themidibus; + +/** + * This is a placeholder interface which makes it easier to program and manipulate objects which implement subinterfaces of MidiListener like {@link RawMidiListener}, {@link SimpleMidiListener} or {@link StandardMidiListener}. It makes it easier to create lists and arrays of such object and allows for a standard method {@link MidiBus#addMidiListener(MidiListener listener)} to add any type of listener to a MidiBus object. + * + * @version 008 + * @author Severin Smith + * @see RawMidiListener + * @see SimpleMidiListener + * @see StandardMidiListener + * @see ObjectMidiListener + * @see MidiBus +*/ +public interface MidiListener { + +} \ No newline at end of file diff --git a/libraries/themidibus/src/themidibus/Note.java b/libraries/themidibus/src/themidibus/Note.java new file mode 100644 index 0000000..8e4e815 --- /dev/null +++ b/libraries/themidibus/src/themidibus/Note.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2009 Severin Smith + * + * This file is part of a library called The MidiBus (themidibus) - http://www.smallbutdigital.com/themidibus.php. + * + * The MidiBus is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The MidiBus is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the MidiBus. If not, see . +*/ + +package themidibus; + +/** + * The Note class represents a pressed or released key. + * + * @version 008 + * @author Severin Smith, Marc Koderer + * @see MidiBus + * @see ObjectMidiListener + * @see ControlChange +*/ + +public class Note { + + static String[] pitchMap = new String[] { + "C", + "C#", + "D", + "D#", + "E", + "F", + "F#", + "G", + "G#", + "A", + "A#", + "B" + }; + + public int channel; + public int pitch; + public int velocity; + + public long ticks; + + public long timestamp; + public String bus_name; + + /** + * Constructs a Note object + * + * @param channel the channel of the Note + * @param pitch the pitch of the Note + * @param velocity the velocity of the Note + */ + public Note(int channel, int pitch, int velocity) { + this(channel, pitch, velocity, 0, -1, null); + } + + /** + * Constructs a Note object + * + * @param channel the channel of the Note + * @param pitch the pitch of the Note + * @param velocity the velocity of the Note + * @param ticks the length in ticks of the Note + */ + public Note(int channel, int pitch, int velocity, int ticks) { + this(channel, pitch, velocity, ticks, -1, null); + } + + /** + * Constructs a Note object + * + * @param channel the channel of the Note + * @param pitch the pitch of the Note + * @param velocity the velocity of the Note + * @param timestamp the timestamp of the Note + * @param bus_name the name of MidiBus associated with the Note + */ + public Note(int channel, int pitch, int velocity, long timestamp, String bus_name) { + this(channel, pitch, velocity, 0, timestamp, bus_name); + } + + /** + * Constructs a Note object + * + * @param channel the channel of the Note + * @param pitch the pitch of the Note + * @param velocity the velocity of the Note + * @param ticks the length in ticks of the Note + * @param timestamp the timestamp of the Note + * @param bus_name the name of MidiBus associated with the Note + */ + public Note(int channel, int pitch, int velocity, int ticks, long timestamp, String bus_name) { + this.channel = channel; + this.pitch = pitch; + this.velocity = velocity; + + this.ticks = ticks; + + this.timestamp = timestamp; + this.bus_name = bus_name; + } + + /** + * Set channel of the Note + * + * @param channel the channel to set + */ + public void setChannel(int channel) { + this.channel = channel; + } + + /** + * Return the channel of the Note + * + * @return the channel + */ + public int channel() { + return channel; + } + + /** + * Set pitch of the Note + * + * @param pitch the pitch to set + */ + public void setPitch(int pitch) { + this.pitch = pitch; + } + + /** + * Return the pitch of the Note + * + * @return the pitch + */ + public int pitch() { + return pitch; + } + + /** + * Return the pitch of the Note relative to C. Range is 0-12. + * + * @return the relative pitch + */ + public int relativePitch() { + return pitch; + } + + /** + * Return the octave of the Note. Octaves are divided by the note C + * + * @return the octave + */ + public int octave() { + return pitch/12; + } + + /** + * Return the name of the note, e.g. "C" or "G#". + * + * @return the note name + */ + public String name() { + return pitchMap[pitch%12]; + } + + /** + * Set velocity of the Note + * + * @param velocity the velocity to set + */ + public void setVelocity(int velocity) { + this.velocity = velocity; + } + + /** + * Return the velocity of the Note + * + * @return the velocity + */ + public int velocity() { + return velocity; + } + + /** + * Set length in ticks of the Note + * + * @param ticks the ticks value to set + */ + public void setTicks(int ticks) { + this.ticks = ticks; + } + + /** + * Return the length in ticks of the Note + * + * @return the ticks length + */ + public long ticks() { + return ticks; + } + + /** + * Returns a string in the format [Note Name, c:channel, p:pitch, v:velocity, t:ticks, ts:timestamp, b:bus_name] e.g "[C, c:0, p:65, v:123, t:0, ts:1234, b:bus123]". If ticks, timestamp or bus_name isn't set, it is omitted. + * + * @return the string representation + */ + public String toString() { + String result = "[" + name() + ", c:" + channel + ", p:" + pitch + ", v:" + velocity; + if(ticks != 0) result += ", t:" + ticks; + if(timestamp != -1) result += ", ts:" + timestamp; + if(bus_name != null) result += ", b:" + bus_name; + result += "]"; + + return result; + } + + /** + * Check if all fields are equal. + * + * @return true if both objects can be considered to be equals + */ + public boolean equals(Object obj) { + if(this == obj) return true; + if(obj == null) return false; + + if(getClass() != obj.getClass()) return false; + + Note other = (Note)obj; + + if(other.channel != this.channel) return false; + if(other.pitch != this.pitch) return false; + if(other.velocity != this.velocity) return false; + + if(other.ticks != this.ticks) return false; + + if(other.timestamp != this.timestamp) return false; + if(other.bus_name != this.bus_name) return false; + + return true; + } + +} diff --git a/libraries/themidibus/src/themidibus/ObjectMidiListener.java b/libraries/themidibus/src/themidibus/ObjectMidiListener.java new file mode 100644 index 0000000..008af03 --- /dev/null +++ b/libraries/themidibus/src/themidibus/ObjectMidiListener.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2009 Severin Smith + * + * This file is part of a library called The MidiBus (themidibus) - http://www.smallbutdigital.com/themidibus.php. + * + * The MidiBus is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The MidiBus is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the MidiBus. If not, see . +*/ + +package themidibus; + +/** + * A ObjectMidiListener can be notified of incomming NoteOn, NoteOff and ControllerChange events via {@link Note} and {@link ControlChange} objects, usually by a MidiBus object which it is connected to. Typically it would analyse and react to incomming messages in some useful way. + * + * @version 008 + * @author Severin Smith, Marc Koderer + * @see MidiListener + * @see RawMidiListener + * @see SimpleMidiListener + * @see StandardMidiListener + * @see Note + * @see ControlChange + * @see MidiBus +*/ + +public interface ObjectMidiListener extends MidiListener { + + /** + * Objects notifying this ObjectMidiListener of a new NoteOn events call this method. + * + * @param note the note object associated with this event + */ + public void noteOn(Note note); + + /** + * Objects notifying this ObjectMidiListener of a new NoteOff events call this method. + * + * @param note the note object associated with this event + */ + public void noteOff(Note note); + + /** + * Objects notifying this ObjectMidiListener of a new ControllerChange events call this method. + * + * @param change the ControlChange object associated with this event + */ + public void controllerChange(ControlChange change); + +} \ No newline at end of file diff --git a/libraries/themidibus/src/themidibus/PApplet.java b/libraries/themidibus/src/themidibus/PApplet.java new file mode 100644 index 0000000..d549355 --- /dev/null +++ b/libraries/themidibus/src/themidibus/PApplet.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) 2009 Severin Smith + * + * This file is part of a library called The MidiBus (themidibus) - http://www.smallbutdigital.com/themidibus.php. + * + * The MidiBus is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The MidiBus is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the MidiBus. If not, see . +*/ + +package themidibus; +import javax.sound.midi.MidiMessage; + +/** + * PApplet is your processing application or sketch. In it you can implement the following methods which will be called whenerever a MidiBus object attached to the PApplet, recieves a new incomming MIDI message of the appropriate type. + *

+ * Note: This page is a dummy page for documentation of the MidiBus' extention of the regular PApplet's functionality, for the full documentation of PApplet please visits the Processing javadocs + * + * @version 008 + * @author Severin Smith + * @see MidiBus + * @see MidiListener + * @see RawMidiListener + * @see StandardMidiListener + * @see SimpleMidiListener +*/ +public class PApplet{ + + /** + * Is passed the channel, controller number and contoller value associated with every new ContollerChange MIDI message recieved by a MidiBus attached to this applet. + * + * @param channel the channel on which the ContollerChange arrived + * @param number the controller number associated with the ContollerChange + * @param value the controller value associated with the ContollerChange + * @see #controllerChange(int channel, int pitch, int velocity, long timestamp, String bus_name) + */ + public void controllerChange(int channel, int number, int value) { + + } + + /** + * Is passed the channel, pitch and velocity associated with every new NoteOff MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message. + * + * @param channel the channel on which the ContollerChange arrived + * @param number the controller number associated with the ContollerChange + * @param value the controller value associated with the ContollerChange + * @param timestamp the timestamp on the midi message + * @param bus_name the name of MidiBus which recieved the ContollerChange + * @see #controllerChange(int channel, int pitch, int velocity) + */ + public void controllerChange(int channel, int number, int value, long timestamp, String bus_name) { + + } + + /** + * Is passed a ControlChange object representing controlChange event + * + * @param change the ControlChange object + * @see #controllerChange(int channel, int pitch, int velocity) + * @see themidibus.ObjectMidiListener#controllerChange(ControlChange) + */ + public void controllerChange(ControlChange change) { + + } + + /** + * Is passed the raw MidiMessage associated with every new MIDI message recieved by a MidiBus attached to this applet. + * + * @param message the MidiMessage recieved + * @see #midiMessage(MidiMessage message, long timestamp, String bus_name) + */ + public void midiMessage(MidiMessage message) { + + } + + /** + * Is passed the raw MidiMessage associated with every new MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message. + * + * @param message the MidiMessage recieved + * @param timestamp the timestamp on the midi message + * @param bus_name the name of MidiBus which recieved the MIDI message + * @see #midiMessage(MidiMessage message) + */ + public void midiMessage(MidiMessage message, long timestamp, String bus_name) { + + } + + /** + * Is passed the channel, pitch and velocity associated with every new NoteOff MIDI message recieved by a MidiBus attached to this applet. + * + * @param channel the channel on which the NoteOff arrived + * @param pitch the pitch associated with the NoteOff + * @param velocity the velocity associated with the NoteOff + * @see #noteOff(int channel, int pitch, int velocity, long timestamp, String bus_name) + */ + public void noteOff(int channel, int pitch, int velocity) { + + } + + /** + * Is passed the channel, pitch and velocity associated with every new NoteOff MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message. + * + * @param channel the channel on which the NoteOff arrived + * @param pitch the pitch associated with the NoteOff + * @param velocity the velocity associated with the NoteOff + * @param timestamp the timestamp on the midi message + * @param bus_name the name of MidiBus which recieved the NoteOff + * @see #noteOff(int channel, int pitch, int velocity) + */ + public void noteOff(int channel, int pitch, int velocity, long timestamp, String bus_name) { + + } + + /** + * Is passed a Note object representing noteOff event + * + * @param note the Note object + * @see #noteOff(int channel, int pitch, int velocity) + * @see themidibus.ObjectMidiListener#noteOn(Note) + */ + public void noteOff(Note note) { + + } + + /** + * Is passed the channel, pitch and velocity associated with every new NoteOn MIDI message recieved by a MidiBus attached to this applet. + * + * @param channel the channel on which the NoteOn arrived + * @param pitch the pitch associated with the NoteOn + * @param velocity the velocity associated with the NoteOn + * @see #noteOn(int channel, int pitch, int velocity, long timestamp, String bus_name) + */ + public void noteOn(int channel, int pitch, int velocity) { + + } + + /** + * Is passed the channel, pitch and velocity associated with every new NoteOn MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message. + * + * @param channel the channel on which the NoteOn arrived + * @param pitch the pitch associated with the NoteOn + * @param velocity the velocity associated with the NoteOn + * @param timestamp the timestamp on the midi message + * @param bus_name the name of MidiBus which recieved the NoteOn + * @see #noteOn(int channel, int pitch, int velocity) + */ + public void noteOn(int channel, int pitch, int velocity, long timestamp, String bus_name) { + + } + + /** + * Is passed a Note object representing noteOn event + * + * @param note the Note object + * @see #noteOn(int channel, int pitch, int velocity) + * @see themidibus.ObjectMidiListener#noteOff(Note) + */ + public void noteOn(Note note) { + + } + + /** + * Is passed the raw data associated with every new MIDI message recieved by a MidiBus attached to this applet. + * + * @param data the raw data associated with the MIDI message + * @see #rawMidi(byte[] data, long timestamp, String bus_name) + */ + public void rawMidi(byte[] data) { + + } + + /** + * Is passed the raw data associated with every new MIDI message recieved by a MidiBus attached to this applet and the name of the MidiBus which recieved the message. + * + * @param data the raw data associated with the MIDI message + * @param timestamp the timestamp on the midi message + * @param bus_name the name of MidiBus which recieved the MIDI message + * @see #rawMidi(byte[] data) + */ + public void rawMidi(byte[] data, long timestamp, String bus_name) { + + } +} diff --git a/libraries/themidibus/src/themidibus/RawMidiListener.java b/libraries/themidibus/src/themidibus/RawMidiListener.java new file mode 100644 index 0000000..d08588c --- /dev/null +++ b/libraries/themidibus/src/themidibus/RawMidiListener.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2009 Severin Smith + * + * This file is part of a library called The MidiBus (themidibus) - http://www.smallbutdigital.com/themidibus.php. + * + * The MidiBus is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The MidiBus is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the MidiBus. If not, see . +*/ + +package themidibus; + +/** + * A RawMidiListener can be notified of incomming MIDI messages in raw form, usually by a MidiBus object which it is connect to. Typically it would analyse and react to incomming MIDI messages in some useful way. + * + * @version 008 + * @author Severin Smith + * @see MidiListener + * @see SimpleMidiListener + * @see StandardMidiListener + * @see ObjectMidiListener + * @see MidiBus +*/ +public interface RawMidiListener extends MidiListener { + /** + * Objects notifying this RawMidiListener of a new MIDI message call this method and pass the raw message to it. + * + * @param data the data bytes that make up the MIDI message + */ + public void rawMidiMessage(byte[] data); +} \ No newline at end of file diff --git a/libraries/themidibus/src/themidibus/SimpleMidiListener.java b/libraries/themidibus/src/themidibus/SimpleMidiListener.java new file mode 100644 index 0000000..6fb9f7e --- /dev/null +++ b/libraries/themidibus/src/themidibus/SimpleMidiListener.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2009 Severin Smith + * + * This file is part of a library called The MidiBus (themidibus) - http://www.smallbutdigital.com/themidibus.php. + * + * The MidiBus is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The MidiBus is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the MidiBus. If not, see . +*/ + +package themidibus; + +/** + * A SimpleMidiListener can be notified of incomming NoteOn, NoteOff and ControllerChange MIDI messages, usually by a MidiBus object which it is connected to. Typically it would analyse and react to incomming MIDI messages in some useful way. + * + * @version 008 + * @author Severin Smith + * @see MidiListener + * @see RawMidiListener + * @see StandardMidiListener + * @see ObjectMidiListener + * @see MidiBus +*/ + +public interface SimpleMidiListener extends MidiListener { + + /** + * Objects notifying this SimpleMidiListener of a new NoteOn MIDI message call this method. + * + * @param channel the channel on which the NoteOn arrived + * @param pitch the pitch associated with the NoteOn + * @param velocity the velocity associated with the NoteOn + */ + public void noteOn(int channel, int pitch, int velocity); + + /** + * Objects notifying this SimpleMidiListener of a new NoteOff MIDI message call this method. + * + * @param channel the channel on which the NoteOff arrived + * @param pitch the pitch associated with the NoteOff + * @param velocity the velocity associated with the NoteOff + */ + public void noteOff(int channel, int pitch, int velocity); + + /** + * Objects notifying this SimpleMidiListener of a new ControllerChange MIDI message call this method. + * + * @param channel the channel on which the ContollerChange arrived + * @param number the controller number associated with the ContollerChange + * @param value the controller value associated with the ContollerChange + */ + public void controllerChange(int channel, int number, int value); + +} \ No newline at end of file diff --git a/libraries/themidibus/src/themidibus/StandardMidiListener.java b/libraries/themidibus/src/themidibus/StandardMidiListener.java new file mode 100644 index 0000000..18b2c32 --- /dev/null +++ b/libraries/themidibus/src/themidibus/StandardMidiListener.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2009 Severin Smith + * + * This file is part of a library called The MidiBus (themidibus) - http://www.smallbutdigital.com/themidibus.php. + * + * The MidiBus is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The MidiBus is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the MidiBus. If not, see . +*/ + +package themidibus; + +import javax.sound.midi.MidiMessage; + +/** + * A StandardMidiListener can be notified of incomming MIDI messages in MidiMessage form, usually by a MidiBus object which it is connected to. Typically it would analyse and react to incomming MIDI messages in some useful way. + * + * @version 008 + * @author Severin Smith + * @see MidiListener + * @see RawMidiListener + * @see SimpleMidiListener + * @see ObjectMidiListener + * @see MidiBus + * @see javax.sound.midi.MidiMessage +*/ +public interface StandardMidiListener extends MidiListener { + /** + * Objects notifying this StandardMidiListener of a new MIDI message call this method and pass the MidiMessage + * + * @param message the MidiMessage received + */ + public void midiMessage(MidiMessage message, long timeStamp); +} \ No newline at end of file diff --git a/libraries/themidibus/src/themidibus/package-info.java b/libraries/themidibus/src/themidibus/package-info.java new file mode 100644 index 0000000..0fedd13 --- /dev/null +++ b/libraries/themidibus/src/themidibus/package-info.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2009 Severin Smith + * + * This file is part of a library called The MidiBus (themidibus) - http://www.smallbutdigital.com/themidibus.php. + * + * The MidiBus is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The MidiBus is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the MidiBus. If not, see . +*/ + +/** + * The MidiBus provides a simple way to access and interact with installed MIDI system resources, although it's especially designed to be used with Processing, it could easily be adapted for use in any java program. + *

+ * IMPORTANT: Mac users may want to install mmj, a Mac OS X universal binary java MIDI subsystem - or an equivalent third party MIDI subsystem - because the apple implementation is lacking support for a number of advanced MIDI features. Mmj is recommended because it works, it's free and it's almost open source (CC licence). Please check README.md for more information. If you do use MMJ you will want to set {@link themidibus.MidiBus#sendTimestamps(boolean sendTimestamps)} to false, otherwise messages won't be sent. + *

+ * Keeping with the spirit of Processing's easy to use sketching/prototyping style, the MidiBus offers a clean and simple way to get at MIDI ressources. Getting the basic functionality of the MidiBus up and running in a sketch is a matter of only a few line. The {@link themidibus.MidiBus} class provides everything needed send and receive MIDI inside a sketch. To jump right into the Midibus, either refer to the paragraph titled "Typical Implementation, Simple" in the description for the {@link themidibus.MidiBus} class, or check out the code examples distributed with this library. + *


+ * It is important to understand that the MidiBus offers little functionality that isn't available from Java's native javax.sound.midi package. Anyone interested in working with MIDI in Java should take the time to read the documentation for the javax.sound.midi. It offers a more full featured and flexible alternative to this package, although it does do so at the cost of added complexity. In addition, it may be worthwhile to skim the "official" Java Tutorial for the javax.sound.* packages. + *


+ *

Related Documentation

+ * + * + * @version 008 + * @author Severin Smith +*/ + +package themidibus;