@database NSM_midi-patchesGuide @node main "NSM midi-patches V0.53" NSM midi-patches V0.53 Made by Kjetil S. Matheussen (ksvalast@ifi.uio.no) Last updated 8.12.99 @{"Introduction " link 1} @{"Programs " link 2} @{"Notes about tools " link notesabouttools} @{"Installation " link 3} @{"Requirements " link 4} @{"Usage " link usage} @{"FAQ " link faq} @{"Bugs " link bugs} @{"Changes " link 5} @{"Contact/www " link 6} @{"Credits " link 7} @endnode @node 1 " INTRODUCTION" Octamed Soundstudio has originally not so much support for midi. With this package, most of the things that was missing, should hopefully be implemented. Whats still has to be done, is to make some sort of midi-sequencer function, and to give support for the Triple Play Plus interface. The last thing will soon be implemented, though. @endnode @node 2 " FEATURES" The pacage consists of the following files and programs: 1. @{"Midirecord. " link Midirecord} 2. @{"Midisend. " link Midisend} 3. @{"Bars'n'Pipes midi input accessory " link accessory} 4. @{"Bars'n'Pipes midi output tool " link tool} 5. @{"Audidevhack. " link Audiodevhack} 6. @{"The Sendmidi programs " link Sendmidi} 7. @{"RecSwitch " link recswitch} 8. @{"3xxloadsave " link 3xxloadsave} @endnode @node Midirecord "Midirecord" 1. Midirecord @{"Introduction " link MidirecordIntroduction} @{"Usage " link MidirecordUsage} @{"Bugs " link MidirecordBugs} @{"Installation " link MidirecordInstallation} @{"Changes " link MidirecordChanges} @{"Files " link MidirecordFiles} @endnode @node MidirecordIntroduction "Midirecord Introduction" This plug-in for Octamed records the following midisignals: pitch-shift, program change, and controller-commands (0xBx) that your synthesizer can provide, (like f.ex. panning, modulation, channel-volume, resonance, reverb, chorus, attack, release, etc. etc.), into the track-editor of Octamed in real-time. If you set the tempo very high, it produces allmost as good result as a real midi-sequencer. The plug-in allso sends note on/off, program change, aftertouch, channel pressure, midipressure and controller change to the midisend plug-in, if that one is used. The program works by patching the rbf interrupt set up by octamed. And I just have to say this: I really wonder why this wasn't implemented in octamed in the first place. Its not very much code that is added. Its around 150 lines of assembly code, and nearly all of that code is allready present in the original rbf interrupt set up by Octamed. And some of the data that that code produces again aren't even used(!). In other words, it had only taken a relatively short time for Teijo to implement this in Octamed! @endnode @node MidirecordUsage "Midirecord Usage" -Main window: ->Rec: Turns recording on/off. (Edit must allso be 'on' for rec to work) ->Map: Sends out midisignals coming in, to out, only changing the channel to the channel that is assigned to the current instrument. You need to start the midisend plug-in after you have started this plug-in to make this work. ->Settings: Opens the settings-window. -Settings window: ->'3xx': -->Conf: Opens the controller commands window in octamed. Do this if you want to use Standard LSB, RPN or NRPN commands. -->Load: Load a controller commands config file. -->Save: Save a controller commands config file. -->Load/Save: All info in this filetype is allso loaded/saved when you press "save settings" or "save settings", so you only need to use them if you want to switch between more than one controller command (3xx) setting. But if you do, you should use the "3xxloadsave" plug-in instead since its much faster to use. -->Update: Press this button after changing anything in the controller commands window. ->'Command': If there is a '~' before the number, it means that it is a Standard LSB, RPN or NRPN command, and can not be recorded, (at least not with this program). Well, standard LSB is ofcourse recorded, but you have to set the option as standard MSB and add $20. ->'Record at..': Which page to record the command at. "First Free Page" and "Higher Page" are not implemented, so thats why you allways get "Don't" when you try to select them. You allso get a "Don't" when try to select a recording-page that is set as Standard LSB, RPN or NRPN. ->"Load Settings"/"Save Settings": load/save settings. -Note: If you turn off midi after the plug-in has started, you have to restart the plug-in to make it work again. @endnode @node MidirecordBugs "Midirecord Bugs" BUGS Probably. But no known at present. @endnode @node MidirecordInstallation "Midirecord Installations" 1. Run "nsm:midirecord" (this should work if nsm is installed correctly) 2. Place the small window were you want it to start up at default. 3. Press the settings-button. 4. Configure midirecord and place the window were you want it to start up at default. You don't have to care about the "Load" and "Save" buttons in the 3xx section. 5. Press "Save Settings", and save the file to your HD. 6. Start a text-editor and edit your rexx:om_startup.omed file. If you don't have such a file, an example can be found in this package. 7. Insert the following line: ADDRESS COMMAND "run >NIL: nsm:midirecord SETTINGS NBNP" Replace "" with the filename you saved your settingsfile as. Remove "SETTINGS" if you don't want the settings-window to show up at start-up. Remove "NBNP" if you want to use Bars'n'Pipes. 8. Midirecord is now finished configured. If you want to edit the changes in the setting-window later, that is ofcourse no problem. @endnode @node MidirecordChanges "Midirecord Changes" 0.30: First version. 0.40: Added the midi-mapper. And set the edit to be 'on' to get the recording to work. Have allso changed command $03 to $13, since that one works much better. 0.40b: Added aftertouch and channel pressure to the midi-mapper, and fixed the $13 command. 0.40c: Put the code that found the midichannel of the current instrument in the midirec.a file, rather than the osersendpatch.a file, as it was before. This made it easier to program the patch to stop the mapper if the current instrument doesn't have any midichannel assigned. Allso made the midirecord window open up at the OCTAMED screen at default, as there was one person that allways got it to open at the workbench-screen before. 0.40d: I am not shure, but I think the only thing added is that midirecord/midisend now function more like one program. I.e you don't need to open midisend after opening this program. 0.50: Part of the NSM midipatch package. @endnode @node MidirecordFiles "Midirecord Files" FILES gui.gui / gui.c and gui.h: This are files created with/by GadToolsBox 2.0b (made by Jan van den Baard) for setting up the gui. The sourcefiles are directly generated from GadToolsBox and are not changed. Feel free to change the gui if you want to. 3xxloadsave: Plug-in to load/save controller-command settings file without using the mouse. recswitch: Plug-in to switch rec status without using the mouse. midirecord: Main-file. midirecord.doc: This file. midirec.a, midirecord.c and 3xx.c: Source-files. midirec.o, 3xx.o and gui.o: Object files. om_startup.omed: An exampe of an Octamed rexx startup-file. rexx:om_startup.omed runs everytime octamed starts up. @endnode @node Midisend "Midisend" 2. Midisend This program patches octameds playing-routine to support everything in this package, and glue things togheter. The name of the executable file is "otpp" and is runned automaticly when starting the midirecord program. @endnode @node accessory "Bars'n'Pipes midi input accessory" 3. Bars'n'Pipes midi input accessory An accessorry in B'n'P is a plug-in that can do all sorts of things for B'n'P. This accessory puts midi-messages from octamed thru Bars'n'Pipes. Install it by double-clicking the icon in B'n'P that is at the right-top of the screen, and choose install from the menues. @endnode @node tool "Bars'n'Pipes midi output tool" 4. Bars'n'Pipes midi output tool Use this tool instead of the normal midi-out tool in Bars'n'Pipes. The normal midi-out tool wont work, because Octamed has allocated the serial-port. Place the tool at the end of each track. If you want, you can use tools that handles other serial-ports (not the internal), or other midi-interfaces instead of this tool for sending out midi-messages (the triple-play out-tools wont work, though, but I'll soon give support for that midi-interface in octamed). There is allso Sample-player out-tools for Bars'n'Pipes you can use, which supports better mixing-routines than octamed. @endnode @node Audiodevhack "Audidevhack" 5. Audidevhack. Both Bars'n'Pipes and Octamed tries to allocate the audio-device. And both of them refuses to play, if they haven't allocated the audio-device. This program patches octamed to think it has allocated the audio-device, while it hasn't. @endnode @node Sendmidi "The Sendmidi programs" 6. The Sendmidi programs There are three amiga-executables that lets you send midi-signals to the internal serial-port while octamed is running. All programs are placed in the midisend directory. The midiport argument does at the moment nothing, but when the package gets support for Triple play plus/Quadra Play, it will decide which midi output-port the message is sent to. SendmidiA: Send bytes to a specified midi-output port specified by the argument line. Input in Hex notation. Example: "sendmidiA 1 90 3c 7f"... will play a middle C at full velocity on channel 1 on midiport #1. SendmidiB: Send bytes to a specified midi-output port specified by the argument line. Input in Decimal notation. Example: "sendmidiA 1 144 60 127"... will play a middle C at full velocity on channel 1 on midiport #1. SendmidiC: Send bytes to a specified midi-output port from a binary-file. Input in Hex notation. Example: If you have a file named ram:midi.bin which is three bytes long and contain the following bytes: 90,3c,7f "sendmidiA 1 ram:midi.bin"... will play a middle C at full velocity on channel 1 on midiport #1. @endnode @node recswitch "Recswitch" The included plug-in "recswitch" switches the rec-state on/off if you want to use the keyboard instead of pressing the "rec"-check button whenever you want to switch the rec-state on/off. @endnode @node 3xxloadsave "3xxloadsave" 3xxloadsave: Plug-in to load/save controller-command settings file without using the mouse. Hmm, I'm not quite shure how useful this one is, though.. @endnode @node notesabouttools "Notes about tools" Tools in Bars'n'Pipes do often not handle more than one similar notes at once. The result is that notes hangs. This means that you should generally be careful to use more than one channel at once for each track. The tools that I have made, and can be found on the nsm homepage, doesn't have this problem though. Note; This problem is not because of the NSM midipatches, its because tools often are programmed with slow and small amigas in mind (plain A500/A1000/A2000). Tools are either optimized to much, or/and made to spare hundreds of bytes of memory. Here are some notes about limitations about some tools you should know about. If you discover more such limitations, please send it to me. Tool Things to look out for -------------------------------------------------------------------------- Articulator Don't use more than one channel at once. RandoNote Max 2 similar notes (whatever channel) @endnode @node 3 " INSTALLATION" 1. Start octamed. 2. Start the @{"midirecord" link MidirecordInstallation} program (make shure that the otpp-program is in nsm:) The next four points are only required if you want to use Bars'n'Pipes: 3. Start audiodevhack. 4. Start Bars'n'Pipes. 5. Install the octamed midiin accessory inside Bars'n'Pipes. 6. Install the octamed midiout tool inside Bars'n'Pipes. You don't need to do all this things each time you start up. To let octamed do this things for you (only point 1-4; 5 and 6 are only required to do once), put a ADDRESS COMMAND "run >NIL: <://> " ...line into your rexx:om_startup.omed file for each program that is supposed to start up when starting octamed. rexx:om_startup.omed is an arexx-script that is executed each time octamed starts up. @endnode @node 4 " Requirements" 1. Octamed 1.03c, patched with the nsm-patch. 2. The nsm-package. (you need the nsm-port) 3. Bars'n'Pipes, if you want to use that feature. 4. At least an 020 if you want to use Bars'n'Pipes. The input-accessory and the output-tool are compiled with the 020-option set to 'on', and wont probably start if runned on a 000 or 010. Read more about reccomended cpu in the @{"faq" link faq} section. All this programs are freeware. Visit http://www.stud.ifi.uio.no/~ksvalast/nsm/ to find out where to download. @endnode @node usage "Usage" 1. @{"Midirecord" link Midirecord} 2. When using Bars'n'Pipes, you should use BPM tempo in Octamed, since the tempo in Bars'n'Pipes are automaticly set to the main-tempo in Octamed. And Bars'n'Pipes only use BPM tempo. Read more about it in the @{"FAQ" link faq} section. 3. You can use Bars'n'Pipes as an "effect-processor" for Octamed. To do this, use a newly implemented player-command in Octamed, $24, to choose which track in B'n'P to let the midi-messages from the current track in Octamed flow thru. Example: 000 C-4 52401 001 --- 00000 002 --- 00000 003 --- 02400 004 C-6 50000 C-4 is played thru the first track of Bars'n'Pipes, while C-6 is played thru Octamed. @endnode @node faq "FAQ" -Some commands stops working when recording. -If you have the "Read key-Up's" selected, octamed doesn't send out midisignals on the track that have a "FFF" benieth. Sad but true. To fix this, replace all "FFF"'s with B-3 xxC00. Its allso possible to write a plug-in that does this automaticly. (I'll probably fix this later) -If I try to quit the midirecord-window after trying to quit octamed, my amiga crash. -You must not do that!!! There is not an easy solution for this problem. You just have to reset your amiga if you forget to quit midirecord before quitting octamed. Don't try to quit midirecord after you have quit Octamed! -The tempo in Bars'n'Pipes doesn't change when I change it in octamed. -Well, it is possible to replace the tempo-window with a new one that both sets the tempo in Bars'n'Pipes and Octamed. But such a tempo-window does not excist now, as far as I know. You just have to use the 0F-command in the track-editor, which allso sets the tempo in Bars'n'Pipes, instead. Or, manually set the tempo in Bars'n'Pipes, ofcourse. -Everything is so slow when using Bars'n'Pipes! -Yes, it slows down a lot. I have an 030, and its too slow for me. So you (and me too) just need to upgrade to a faster amiga. @endnode @node bugs "Bugs" Read more about bugs in the @{"Changes" link 5} section. @endnode @node 5 " CHANGES" 0.53: 1. Made Bars'n'Pipes's tempo to be set by octamed. Whenever the Fxx command is used in octamed, Bars'n'Pipes tempo will be set to that walue. (that is, f01-ff0). This is important because a lot of tools uses the tempo. (f.ex echo-tools, arpeggiators, the glissando tool, etc.) 2. Fixed a bit more on the "Immidiate Preset Change" bug. Now that one should be completely fixed. But there might be more problems.. The reason for the "Immidiate Preset Change" bug is because I haven't found a reliable way to find out (fast) if octamed is playing or not, and allso where the addmidiD code is called from. If it is called from the player-routine (the timer-interrupt), there should be now problem, but if not, d7 (which is the register holding track-information) can hold anything, and d7 is the register that chooses which track in B'n'P the midi-message are sent thru. If d7 is 0, there shouldn't be a problem. But if not, the midi-signal will not be sent if B'n'P doesn't have any tracks that is the number d7 holds. I haven't noticed any problems yet because of this, but if /you/ do, please report to me. 3. Fixed a couple of things in the octamidiout-tool. Hopefully it should now handle sysx-messages, but I haven't tested it, mainly because I don't know how to send out sysx-messages in B'n'P. Hmm, well, when I look at the code, I see that sysx still wont work. Well, if you need sysx, please contact me. Its not that much work to implement. 4. Updated the manual a bit. 5. Fixed the statement "Waiting for Bars'n'Pipes to start..." thing. Previously it appeared after B'n'P had started, instead of before. 0.52: Bug-fix. Previously, if "Immidiate Preset Change" was set to 'on', it was impossible to choose presets higher than 64, with some exceptions. There was allso other problems that accured. Hopefully, this should now be fixed, but I am not quite shure... Thanks to Johan Person for finding this bug. 0.51: First non-beta version. Changes: Option to turn off/on bars'n'pipes via having "NBNP" in the commandline to midirecord for not using bars'n'pipes. Some optimalizations. Written an amiga-guide for the manual, and made a better manual. Cleaned up the source a bit. And most important: Removed some ugly bugs and fixed a couple of things. 0.50: First version (beta) @endnode @node 6 " CONTACT/AUTHOR" Kjetil S. Matheussen ksvalast@ifi.uio.no http://www.stud.ifi.uio.no/~ksvalast/nsm/ @endnode @node 7 " Credits" Octamed Soundstudio 1.03c: Teijo Kinnunen. NSM patching/plug-in system: Kjetil S. Matheussen (main hacker), Claude-Heiland Allen (e-development kit and bug-finder). Bars'n'Pipes: The people that made Bars'n'Pipes. NSM midi-patches: Kjetil S. Matheussen. Bars'n'Pipes midi-tool/midi-accessory icons: G.O. Jones. (I haven't ask if it was okey, but...) Bars'n'Pipes octamed midi-out tool: Kjetil S. Matheussen, mostly based on code made by G.O. Jones. Bars'n'Pipes Octamed midi-in accessory: Kjetil S. Matheussen. @endnode