MIDI for the Computerphile Page 1 A MIDI Primer for Computerphiles In the course of pursuing my dual interests in music and computers, I've noticed one thing: though "crossover" in these two fields is certainly evident in hardware and software, most computer folk seem to know little about what those weird musician types are doing with their digital machines, and musicians, well, many musicians still think a byte is something you go out for after playing a set. Hopefully, this report will be of some use to computer people who would like to know something about the computer revolution which has swept the music industry, but don't know where to start. Obviously, this is a very large topic, and I can only present the broadest outlines here. If there is sufficient interest, more detailed reports will follow. A Basic Definition and a Little History MIDI (Musical Instrument Digital Interface) is a communications protocol developed jointly by American and Japanese manufacturers of electronic musical instruments. It is a defined standard administered by an independent association, the International Midi Association, and, at least theoretically, assures compatibility among equipment produced by different manufacturers. In practice, the ideal of total compatibility is not always achieved, but at least "MIDI standard" has a little more meaning than "RS232 standard interface". Now for a little history. MIDI is a fairly recent innovation; the standard was first proposed in 1981, when, fortunately, it was realized that unless someone did something, chaos would prevail in the musical instrument industry (with, of course, the resultant loss of sales. Never forget that MIDI was spawned by manufacturers, not by users. More on this later.) Over the past 15 or 20 years, many electronic instruments have been introduced. Keyboard synthesizers are examples that are probably familiar to most people. These machines were analog devices -- the pitch of the sound they produced was determined by a linear-scaled control voltage generated by the keyboard. With the advent of microprocessors, it became feasible to produce digitally controlled instruments, eliminating the inherent instability and inaccuracy of the analog control approach. Please note, that the terms digital and analog are used here only to describe the method of control; they have a totally different meaning when applied to the technique used to generate the sound. That will be discussed in the section on Hardware. Anyway, what is important is that instead of keyboards that produced varying voltages, you now have keyboards that produce discrete codes, just like a computer keyboard. Now I must digress for a moment, and present a short discussion on the elements of tonal music. Tonal music (as distinguished from atonal music, i.e. noise) can be described as constituting three determinant parameters: 1 - Notes (comprised of pitch and harmonic data) 2 - Volume (how loud or soft the sounded note is) 3 - Duration (how long the note is sounded) A digitally-encoded keyboard is capable of generating, as a discrete quantity, only one of the 3 parameters. Notes are determined by which key is pressed. However, duration can be determined by measuring how long the key is pressed against a known time base. Volume is a little tougher; you can measure the pressure with which the key is hit, but that will necessarily require analog measurement. However, if you measure the time between the moment the key begins to be depressed and the moment it is fully depressed, you will know how fast the key is travelling, which gives a good indication of how hard it was struck. This measurement, (beginning of key travel - end of key travel/time) is called "velocity" and provides the third parameter. (Some MIDI instruments use analog pressure measurements to generate velocity data). If these three parameters were recorded in real-time, and then transmitted to an instrument, it would be possible to reproduce the original performance exactly as the musician played it. This technique offers a major advantage over analog recording technology: there is none of the degradation of sound which is inherent in any analog recording process. The first devices which attempted to store and reproduce these parameters are familiar to everyone: the old-fashioned player piano captured key presses in real-time and stored them on paper piano rolls for later retrieval. The evolution of electronic instruments resulted in various schemes to electronically store these parameters. However, the early attempts at "sequencing" (the process of coding, storing and retrieving note, volume and duration data) were individually developed by each manufacturer -- compatibility between different brands of instruments was rare (nonexistent). The MIDI standard was originally proposed to provide a single standard to be used by all instrument manufacturers, so that varied and different instruments could function together. However, as will be shown later, MIDI has evolved considerably beyond a basic note definition "language". A Little Technical Data I won't reproduce the full standard here because it is readily available from a variety of sources and is not necessary for understanding the basic principles and applications of MIDI. MIDI is a synchronous digital protocol. Data is sent in 8-bit words at 31.2K baud using a current loop. Why yet another format, when good ole' RS232 is sitting there on just about every computer in existence? The official Party Line is: RS232, with its top speed of 19.2K is too slow to handle all the note data. Current loop is necessary to suppress interference that would result from the long cable runs. Could it be an excuse to sell more hardware? Hmmmmmm. Anyway, back to facts. MIDI protocol consists of control and data words which may be from 1 to 3 bytes long, or, in certain situations, longer. MIDI defines the three parameters from the previous section as follows: NOTES: 128 notes are defined, from 0 to 127. Notes follow the standard even-tempered chromatic scale. Notes are NOT defined as specific frequencies, permitting performers to tune their instruments as required. VOLUME: The primary means of specifying volume is velocity (see previous discussion). Velocity is quantized per note in discrete steps from 0 (softest) to 127 (loudest). There are also other parameters which control relative volume of the entire instrument. DURATION: MIDI handles duration of notes with two parameters: NOTE ON and NOTE OFF. NOTE ON is generated when the key is pressed, NOTE OFF is generated when the key is released. These two commands are sent independently of each other; if a NOTE ON is issued and a corresponding NOTE OFF is not sent (because of data errors, mechanical failures, or poor programming) the note will sound forever (or until the instrument is turned off). This presents occasional problems, particularly in live performance, because, as in any communications protocol, data errors do sometimes happen. MIDI does provide an "All Notes Off" command. As stated before, duration must be measured against a known time standard. MIDI provides a MIDI clock signal, which is sent as a specifically designated data byte. MIDI divides each musical beat into 128 MIDI clocks. MIDI also defines the following parameters: PROGRAM CHANGE: This parameter selects different "patches" or sounds in the musical instrument. The programs are numbered 0-127. Note that the patches themselves are not defined by the MIDI standard. Program #32 might be a violin on one synthesizer and barking dogs on another. CHANNEL: MIDI provides for 16 different channels. Most MIDI commands and data can be specific to a single channel, i.e. instrument, or can be global. PITCH BEND: As the name implies, the pitch of the note can be "bent" up or down in real time (remember Jimi Hendrix?). MODULATION: This is a control parameter that usually effects the vibrato sound of the note, though some instruments can be programmed to use modulation data to control other parameters. Modulation and Pitch Bend are usually controlled from the instrument with wheels or levers that the performer can rock back and forth. SUSTAIN: The same as the sustain pedal on a piano, it will cause the note to sound until the pedal (or other control device) is released. The MIDI spec allows for 127 different control parameters, although only a small number are currently identified and standardized. In addition, MIDI provides a "system exclusive" message. Each manufacturer is assigned their own unique "sys ex" code which allows them to implement custom features without interfering with other manufacturers customizations. Ah ha! you say, doesn't that defeat the purpose of a "standard"? Yes, to an extent it does, but remember it was the manufacturers of the equipment who pushed for a standard, and allows for innovation and differentiation between brands. And, as stated earlier, you must admit that this standard is considerably more consistent than a "standard" RS232 interface. The preceding constitutes only the broadest description of the MIDI protocol, and there are quite a few more features which I haven't covered here. However, you should have a general idea of the kinds of data MIDI can handle. Now I'll tell you some of the ways MIDI is used. What is MIDI Used For? Ok, we've established that MIDI is both a communications protocol and note definition language. What can it do? 1. Control of Instruments Any musical instrument can be thought of as having two distinct components: the sound producing component and the control component. As an example, the keyboard of a piano, the frets on a guitar and the buttons on a clarinet can all be thought of as control components. The piano's strings and hammers, the guitar's strings and acoustic body (or magnetic pickups if it is electric) and the clarinet's reeds and hollow body are all sound producers. The first application for MIDI permits the separation of control and sound production components. The most common (though not the only) MIDI controller is the keyboard. The keyboard generates the NOTE ON and NOTE OFF data as well as various other control data (see previous section) and passes it on to the sound producing section. The sound producing section could be a synthesizer, digital sampler, drum machine, or any other MIDI equipped sound producing device. Most synthesizers combine the sound producing device and the keyboard controller in a single physical package. However, MIDI permits them two be addressed as two distinct and separate sections. A single musician at a single keyboard can play many different instruments simultaneously. There are two ways of doing this. The first places several different sound producers on the same channel, all responding to the same MIDI data at the same time. This is a process called "layering" and can be used to produce full, rich, harmonically complex sounds. The effect is of several different instruments all playing in unison. The second technique is called "splitting" the keyboard -- arbitrarily assigning specific channels to specific notes on the keyboard. This permits different instruments to play different music, all under the control of one musician at one keyboard. As an example, the musician might assign the bottom two octaves of the keyboard to channel 1 and the rest of the keyboard to channel 2. If a digital sampler set to reproduce the sound of a bass is assigned to channel 1, and a synthesizer producing a piano sound is assigned to channel 2, the musician will be able to play the bass line accompaniment with his left hand while playing the piano lead with his right. Note that when instruments are layered, an unlimited number of instruments may be played. However, when the keyboard is split, the maximum number of instruments that may be controlled is limited to the maximum number of MIDI channels -- 16. 2. Sequencers Another obvious application for MIDI is the storing of the MIDI data stream for later playback -- a process known as sequencing. This task may be performed either by a dedicated piece of hardware (called, of course, a "sequencer") or by general purpose computers equipped with the appropriate software and interfacing. Most sequencers allow editing of the MIDI data -- wrong notes can be corrected, new material can be entered one note at a time, and sections can be rearranged, moved or copied (much like a word processor). Almost all sequencers allow for transposition (changing key) and tempo changes. Some will "auto-correct" so that all notes are played exactly on the beat, eliminating any sloppiness in playing. Since MIDI provides 16 unique channels, 16 different instruments can be controlled simultaneously, allowing the sequencer to function like a multi-track tape recorder. Each instrument is "played" into the sequencer individually on a different channel. When all the parts have been entered, the sequencer can play them back all at the same time, in effect creating a one-man band (or one-man philharmonic orchestra). Finally, since MIDI was developed as a professional and semiprofessional musical tool, several features required for recording are supported. Most sequencers allow for some form of tape sync. In the most basic form of tape sync, the sequencer provides a synchronization signal which can be laid down on one track of a multi-track tape recorder. When new tracks are laid down, the sequencer can synchronize to the previously recorded material. This makes multi-track recording, over-dubbing, and similar recording tricks much easier. The MIDI spec also defines a MIDI SONG POINTER, which can be thought of as "mile markers" in the music. A sequencer that supports MIDI SONG POINTERS is capable of automated punch-in and punch-out -- the process of inserting new material into a previously recorded track. 3. Librarian Software One of the uses manufacturers of MIDI instruments make of the SYSTEM EXCLUSIVE command is for data dumps; literally "dumping" all the parameter data needed to define sounds and setups out the MIDI line on command. Software that stores this data for later recall is called Librarian software. Most librarians are not limited to merely storing and retrieving the dumped data, but are also capable of editing specific patch parameters -- a task which is more easily performed on a computer with a full keyboard and video display than on the more limited displays and entry devices available on the synthesizers themselves. A special form of librarian, generally called a Sound Modeling Program, use the SYSTEM EXCLUSIVE dump command to obtain wave sample data from digital samplers (see the section on Hardware). The wave sample can then be displayed, manipulated, stored and retrieved by the librarian. "Serious" sampling with digital samplers virtually mandates the use of some form of Sound Modeling Program. 4. Notation Software Notation software takes the MIDI note data and translates it into conventional music notation which can be displayed on the screen or printed on a dot matrix or laser printer. It allows a musician to play music in on the controller keyboard in real time and get finished musical scores out. Alternatively, music can be entered in notational form on the computer keyboard using wordprocessor-like commands, and the finished result can be heard played on a MIDI equipped synthesizer. Copyright 1987 by Paul Tauger. This article may be freely exchanged, copied and/or distributed provided it is done without charge. 5. Other Applications Lately, MIDI has also found application in non-musical functions, e.g. controlling mixing boards, stage lighting and sound processing equipment (reverbs, digital delays, etc.). Problems with MIDI As powerful a tool as MIDI is, it is not totally without problems. What follows are a few cautionary notes: 1. As already mentioned, MIDI defines note duration with two separate data commands: NOTE ON and NOTE OFF. The possibility of a NOTE ON being transmitted without a corresponding NOTE OFF following is an always present danger. Data can get garbled during transmission, lines become unplugged (the MIDI standard utilizes 5-pin DIN connectors which have a nasty habit of loosening in their sockets), channels accidentally get switched, etc. Without a NOTE OFF command, the note will continue to sound for ever. This can be a major annoyance in a recording session (more than annoying if it occurs during that once-in-a-lifetime hot set) and in live performance, well, you get the idea. Various manufacturers have come up with different solutions to the problem, the most common being a button which, when pressed, produces an ALL NOTES OFF command. This will, of course, silence the offending note, but silences all the other notes in the process. Because the two note NOTE ON/NOTE OFF structure is intrinsic to the MIDI spec, we will just have to live with the occasional stuck note. 2. MIDI transmits at 31.2k baud. A little math shows that MIDI is capable of sending approximately 1000 notes per second. This is obviously more than any musician can ever play. However, when you divide this capacity among 16 channels, add in the data stream produced by controllers such as pitch benders and modulation wheels, then throw in a few program changes for good measure, you have the possibility of overrunning the data. To be honest, I've never heard of this happening, but the possibility is still there. 3. Most MIDI instruments contain a MIDI-in jack for receiving data, a MIDI-out jack for transmitting data, and a MIDI-thru jack for passing MIDI data along to another instrument. When instruments are daisy-chained together, a perceivable delay develops between the first and last instrument in the chain. This is the infamous "MIDI delay" of which you may have heard. This delay can be eliminated by using a device known as a "MIDI Thru Box". This is an active splitter that accepts one MIDI input and divides it into 4,6 or more MIDI outputs, thereby assuring that all instruments receive the MIDI signal at the same time. Does it solve the problem? You bet! Does it cost more money? You bet! 4. Another problem, frequently mistaken for MIDI delay, is inherent in some MIDI synthesizers. Remember that the keys on the keyboard are scanned sequentially, in the same manner as a computer keyboard. In some brands of keyboard synthesizers, the internal electronics introduce their own delays in translating the key presses into sounds. Though not specifically a MIDI problem, it is a problem none the less, and is particularly evident when the musician "grabs" large chords consisting of many notes. Fortunately, this problem is recognized as a hardware "bug" and is usually corrected by the manufacturer (after enough people complain). 5. By its very nature, MIDI is designed to permit one controller on line at a time. More than one controller on line will result in inevitable data collisions with the resultant garbling of data. Think of two computers sending data to two printers at the same time. There are devices available which mediate data contention between two MIDI controllers. Generally called Midi Mergers, they are another relatively expensive solution to what seems like a simple problem. 6. Though the MIDI protocol is clearly defined in the spec, computer storage schemes are left up to the individual software producer. There is no MIDI equivalent of an ASCII or EBDIC file. Consequently, MIDI data files produced by one piece of software can not be read by another. This would be fine if there were such a thing as a program that did everything (and did it well). However, as in the case of the "integrated" packages that combined word processors, spread sheets, data bases and communications software all in one box, such as thing simply doesn't exist. Right now, the only way to exchange MIDI data between programs is by transmitting the data over a physical MIDI data line between two computers. 7. As mentioned earlier, the MIDI spec provides considerable latitude to manufacturers who want to incorporate custom features in their instruments. Consequently, MIDI is afflicted with "creeping non-standardization". There are already controller number conflicts between some of the largest instrument manufacturers, and the SYSTEM EXCLUSIVE command guarantees that no single librarian program will work with all synthesizers. 8. Now for what I see as the major problem with MIDI - MONEY! Until the electronic revolution, quality musical instruments were carefully crafted, often handmade, and very expensive. After all, great instrument making is an art. Consequently, musicians have become accustomed to paying a lot of money for the instruments they play. This tradition has been maintained by many manufacturers of mass-produced electronic instruments. There are exceptions (see the description of the Casio CZ-101 in the Hardware section), but for the most part, the sales price of a piece of electronic musical gear frequently does not bear any correspondence to the cost of its manufacture. Fortunately, the current trend is towards dropping prices. However, walk into any music store and you will see MIDI cables (2 DIN plugs and 10 feet of 2 conductor shield cable) for $25 or more. Though good MIDI software tends to be very expensive, it should be remembered that MIDI software publishers have a much more limited market for their product than publishers of more common business-oriented packages. A Brief (and Biased) Hardware Catalog I would like to conclude this report with a description of the types of MIDI hardware currently available. Hardware selection is a very personal decision, and what I say here (beyond the basic descriptions) is necessarily biased by my own preferences. Here goes: 1. Sound Producing Devices The devices which produce the actual sounds can be divided into two basic categories: - Synthesizers - devices which generate basic sound waveforms, and, by manipulating various parameters of the sound (envelope, modulation, etc.) can produce a diversity of tonal textures and colors. - Samplers - devices that digitally record, or sample, a sound, and then play it back at pitches determined by the controller. Synthesizers can be divided into two broad categories. Analog synthesizer use conventional oscillators and filters to produce different sound waveforms, e.g. sine waves, square waves, triangle waves, etc. Digital synthesizers "store" a digitally encoded waveform in ROM, and produce their sounds by reading the waveform out to D-to-A convertor. Generally, analog synthesizers are thought of as producing "warmer" sounds than their digital counterparts. Some common synthesizers are: Yamaha DX-7 (approx. $1700) - The DX-7 has become something of a "standard" for digital synthesis, and is used by many professional musicians. Most librarian software supports this machine. Casio CZ-101 (approx. $300) - Casio has a complete line of digital synthesizers, but the CZ-101, in my opinion, offers more "bang for the buck" than anything else on the market. This machine is supported by many librarians, is capable of producing an astonishing range of sounds and is an excellent "starter" for anyone interested in testing the waters of electronic music. Two drawbacks: it has a small keyboard that is difficult to play, and does not support note velocity; all notes default to a velocity of 64. Samplers are available in a wide range of prices and capabilities. Factors to be considered in purchasing a sampler: 1 - Sample width. The more bits per sample, the better the resolution, dynamic range, and fidelity. This rule is not written in stone, however, as many manufacturers have developed data compression algorithms that allow them to squeeze more information out of smaller width samples, and a 12-bit machine may not necessarily sound better than an 8-bit machine. 2 - Sampling rate. Higher sampling rates permit the reproduction of higher frequency sound data. The Nyquist rule specifies a sampling rate 2-1/2 times the frequency of the highest sound to be sampled, i.e. to sample the full audible audio spectrum (20 Hz to 20,000 Hz), a sampler should have a sampling rate of (2.5 * 20,000) or 50,000 samples per second. 3 - Number of active samples. The sound of a "real" instrument can not be reproduced by sampling only one note and "stretching" it across the entire keyboard. Many samples taken at many different pitches are necessary to effectively simulate the distinctive voice of an instrument. Some samplers provide only a single sample at a time which must be stretched. Others provide as many as 64 active samples at a time which may be assigned to specific sections of the keyboard as needed. 4 - Available memory. Samplers with a lot of memory can allow higher sampling frequencies, longer samples, and more active samples. Digital Samplers are "where the action is" and new machines are being introduced all the time. Some inexpensive samples of samplers: Akai S612 (approx. $1000 with disk storage): The least expensive "real" sampler (as contrasted with several sampling toys that have recently hit the market) the S612 is also available in an expanded version called the S900 for approximately $3000. The S612 is limited to one active sample at a time. Sampling rate is also limited, which restricts its ability to sample high frequency sounds. In addition, it is a rack-mounted device which requires a MIDI keyboard to control it. It is, however, a fully implemented sampler for a minimum price, and constitutes a good entry-level machine for those who want to experiment with sampling. Ensoniq Mirage (approx. $1700 with keyboard): The Mirage is a versatile instrument that offers a user-selectable sample rates up to 30 kHz with up to 16 active samples. The machine also has a full sound modification section consisting of the traditional envelope and filter synthesizer controls, permitting the user considerable flexibility in customizing sound samples. Ensoniq offers a large library of factory samples on 3-1/2" disk (disk drive included with the Mirage) which range in quality from adequate to extraordinary. A good test for a sampler is the ability to recreate the sound of an acoustic piano, as pianos produce extremely complex waveforms. The Mirage does a very credible job with pianos, as well as other acoustic instruments. The Mirage is also available in a less expensive rack mount version (no keyboard). Sequential Circuits Prophet 2000 (approx. $2500): 12-bit sampler with extensive MIDI implementation. Sampling rate user-switchable up to 41 kHz. There has been some criticism of the quality of factory-produced library samples, but the machine is capable of extremely high-quality sampling. Emu Emulator II (approx. $8000): A very high quality sampler the uses a proprietary data encoding scheme to purportedly wring 14-bit resolution out of 8-bit samples. The Emulator was one of the first "affordable" samplers (as compared with the $50K - $100K Fairlight and Synclavier) and has seen extensive use in professional recording and live performance. Drum machines are specialized devices that simulate the sound of a drum set. The sounds are ROM-based digital samples, though some machines permit the user to sample their own sounds. All drum machines allow the user to define a number of patterns which can be strung together to form "songs". A representative drum machine: Yamaha RX-15 (approx. $400) - Has 16 different drum sounds (only 12 available at the same time), memory for up to 99 patterns and 10 songs (depending on complexity). Good MIDI implementation, though incapable of MIDI sys ex dumps. Also available as the RX-11 (approx. $700) with complete MIDI implementation. 2 - Keyboard Controllers Keyboard controllers produce no sounds by themselves but generate the MIDI data necessary to control MIDI sound-producing devices. Keyboard controllers have "actions" that provide a feel similar to traditional pianos. MIDI data can also be generated by non-keyboard devices, including guitars, drums and various wind instruments. Devices called "pitch riders" can translate an analog sound input into MIDI data output. 3 - Computers This is a volatile area for discussion, with proponents of different brands fiercely loyal to their machines (as I am fiercely loyal to mine - an IBM PC-XT). Anyway, here's a quick run down: Inexpensive Machines: Commodore 64/128: Many software packages are available, as well as different interface options. The machine's 64K of memory presents a limitation for sequencing and scoring programs, but low cost of the Commodores makes for them good MIDI "starter" systems. If you are considering the Commodore, avoid software that claims it can use the 64's internal sound chip to produce "real professional synthesizer sounds". The sound chip on the 64 is quite clever and very versatile, but is limited to three voice polyphony and has severely restricted sound modifying capabilities. It is not a substitute for a synthesizer by itself. Passport and Dr. T are two publishers of quality MIDI software for the Commodore. Low-cost Atari's: Same limitations as the Commodore, though perhaps with fewer quality software packages available. Noted exception: Hybrid Arts produces well recognized and well respected software, though unfortunately, only for the Atari line. Apple II - About on a par with the cheap Atari's from a music standpoint. 48K memory presents severe limitations. Moderately Priced Machines: Only two worth considering - the Amiga and the Atari ST. The Atari has slightly more software packages available and offers a built-in MIDI interface. The MIDI interface is an extra-cost option on the Amiga. I'll avoid jumping into the Atari vs. Amiga war by saying both machines offer good value and are well-suited for MIDI and other music applications. More Expensive Machines: Macintosh: In fairness, I must confess to a certain amount of anti-Mac prejudice. My criticisms are not new: expensive peripherals, up-until-recently closed architecture, hard-to-support serial bus, operating system designed for computerphobes, etc. However, if you like it you like it, and there are some excellent professional music packages available for it. However, my preference, hands down, is: IBM PC-XT (and PC clones): The PC offers a great variety of powerful, professional music software packages, and a variety of flexible MIDI interfaces are available for it. It is also the only machine which will run Personal Composer, the only notation program I've seen which actually works. There are other notation programs out, but they are so riddled with bugs as to be almost unusable, or else are so limited in their implementations as to impose severe restrictions on composers. (I will happily retract the preceding statements upon compelling evidence to the contrary). One program worth mentioning is Texture, a sequencer which has become the de facto standard of professional musicians. Final Words As stated at the outset, MIDI is a very large topic to be tackled in a single report. I hope I have presented enough information to give the MIDI neophyte a basic understanding of the topic. Let me also remind you that the "review" material presented here is highly subjective, particularly in the "hardware" section. There are many more fine instruments and software packages which I have not mentioned here. A good source for information on MIDI and electronic music in general is KEYBOARD magazine, which publishes reviews of hardware and software, features on all aspects of keyboard music (both acoustic and electronic), occasional how-to articles, etc. I hope some of you who read this will be motivated to experiment with MIDI. The control capabilities of sequencers and the sound generating abilities of the various synthesizers and samplers put the ability to create professional sounding music in the hands of almost anyone. If there is enough interest, I can prepare occasional reports that explore specific areas of electronic music production in greater detail. Messages for me can be left at The Sleepy Hollow BBS, 213-859-9334 (24 hours, 1200 baud, 8-bit, no parity, 1 stop bit), which, incidentally, is the finest BBS I've encountered and is run by a knowledgeable and dedicated Sysop. Copyright 1987 by Paul Tauger. This article may be freely exchanged, copied and/or distributed provided it is done without charge.