File extension SMF. SMF formats Open smf file

If you have a computer installed antivirus software can scan all files on the computer, as well as each file separately... You can scan any file by right-clicking on the file and selecting the appropriate option to scan the file for viruses.

For example, in this figure, file my-file.smf, then you need to right-click on this file, and select the option from the file menu "Scan with AVG"... Selecting this option will open AVG Antivirus, which will scan this file for viruses.


Sometimes an error can result from incorrect software installation, which may be due to a problem encountered during the installation process. It may interfere with your operating system link your SMF file to the correct application software influencing the so-called "File extension associations".

Sometimes simple reinstalling Apache OpenOffice might solve your problem by correctly linking SMF with Apache OpenOffice. In other cases, problems with file associations can result from poor software programming developer and you may need to contact the developer for further assistance.


Advice: Try updating Apache OpenOffice to the latest version to make sure the latest patches and updates are installed.


It may seem too obvious, but often the SMF file itself may be causing the problem... If you received a file via an email attachment or downloaded it from a website and the download process was interrupted (for example, a power outage or other reason), the file may be damaged... If possible, try getting a fresh copy of the SMF file and try opening it again.


Carefully: A damaged file can cause collateral damage to previous or pre-existing malware on your PC, so it is very important that you have an updated antivirus running on your PC at all times.


If your SMF file related to the hardware on your computer to open the file you may need update device drivers related to this equipment.

This problem usually associated with types of media files that depend on the successful opening of the hardware inside the computer, for example, sound card or video card... For example, if you are trying to open an audio file but cannot open it, you may need to update sound card drivers.


Advice: If, when you try to open an SMF file, you get SYS file related error message, the problem could probably be related to damaged or outdated device drivers that need to be updated. This process can be facilitated by using a driver update software such as DriverDoc.


If the steps did not solve the problem and you're still having problems opening SMF files, it could be due to lack of available system resources... Some versions of SMF files may require a significant amount of resources (e.g. memory / RAM, processing power) to open properly on your computer. This problem occurs quite often if you are using fairly old computer hardware and at the same time a much newer operating system.

This issue can occur when the computer has a hard time completing a task, as the operating system (and other services running in the background) can consume too many resources to open the SMF file... Try closing all applications on your PC before opening StarMath Formula File. By freeing up all the available resources on your computer, you provide a better environment for trying to open the SMF file.


If you completed all the steps above and your SMF file still won't open, you might need to run equipment upgrade... In most cases, even with older hardware versions, the processing power may still be more than adequate for most custom applications (unless you're doing a lot of CPU-intensive work like 3D rendering, financial / scientific modeling, or heavy multimedia work) ... Thus, it is likely that your computer does not have enough memory(more commonly called "RAM", or random access memory) to perform the task of opening a file.

Part 5 of a series of articles detailing the MIDI protocol.

One of the three parts of the MIDI protocol is the data storage format specification (remember, the other two are the message format and the hardware interface specification). The message format was discussed in the first three articles of the series, now is the time for the storage format. It was proposed by the MMA organization in late 1987 and was named Standard MIDI Files (SMF).

The purpose of MIDI files is to allow events (that is, time-stamped MIDI messages) to be exchanged between various devices and programs. Before the advent of standard MIDI files, an arrangement prepared in one sequencer could not be loaded into another due to format incompatibilities. This is not to say that with the advent of SMF, all sequencer manufacturers have switched to this format. There are several reasons for this, and we will also talk about them today.

Since the storage of information is directly related to the device of sequencers, we will dwell on this matter in more detail, but only to the extent that is necessary to understand SMF. And, undoubtedly, we will devote one of the next articles in the cycle to sequencers.

Developments
A time-stamped MIDI message is called event... Different units can be used to indicate time - ticks, internal pulses, time in SMPTE format, etc. It is important to understand the fundamental difference between an event and a message. The message "lives" for a fraction of a millisecond of real time - from the moment it is generated by the source to the moment it is sent to the receiver for execution. It can be caught in the process of transmission over a MIDI cable in the form of a set of pulses. An event is a few bytes of information recorded in the device's memory, on the basis of which a message will be generated in the future, at the appointed time.

For example, the sequencer can store a "pick a note" event with a timestamp of 100ms from the start of playback. You can edit this event in two dimensions: firstly, change the parameters of the MIDI message itself (in this case, the pitch or dynamics of the note), and secondly, move the note along the track, that is, change the execution time of the message.

Events appear in the sequencer's memory while recording MIDI messages. When you press the Record button, the sequencer turns on the hardware pulse generator (ticks) and starts "listening" to the specified MIDI input. For example, when you press a key, the input receives the "pick a note" message. The sequencer looks - aha, the message arrived at the 20th tick, and writes it into memory with a label 20. After a couple of seconds, they released the key - the message "remove the note" came, the internal generator happily waved 64 ticks to the sequencer at that moment. The sequencer saves a message with label 64. Now we are dealing with two events - Note On and Note Off. The pulse generator is turned on again during playback. When the 20th tick comes up, a Note On message is sent to the MIDI output of the sequencer, the 64th tick is a Note Off. We recorded and then played back the performer's actions!

Obviously, the same can be done offline, that is, without the need for live performance. By clicking the mouse in the right place on the track (and having selected the note duration in advance), we will build in the memory of the sequencer exactly the previous picture.

Memory types
Now is the time to apply two daunting computer terms: primary and secondary memory. Primary (or internal) memory is the sequencer memory where messages are recorded and events are stored throughout the entire session. The contents of this memory are cleared when the power is turned off. This interpretation is more suitable for hardware sequencers. In software sequencers, primary memory is simply the computer's RAM. To store the contents of the primary memory for a long time, secondary memory is used, or, in other words, data carriers. This can be a floppy disk, hard drive, smart card, and the like.

The amount of primary memory in hardware sequencers and workstations (remember, a workstation is a tone generator and sequencer in one box) is usually expressed in the number of stored notes (for example, 200 thousand). Sometimes the volume is expressed in events, in this case you need to be on your guard - one note requires two events to store (pressing and releasing a key), and turning the pitch wheel or aftertouch can generate up to 100 or more events. It happens that the memory size of a sequencer is expressed in native computer units - kilobytes. But this is also not very convenient - one event can occupy a different number of bytes (from five to several tens).

In modern software sequencers, few people care about the amount of primary memory - even on a machine with 128 MB of RAM, you can forget about any restrictions when working with MIDI data. In addition, there are sequencers that can play an arrangement directly from disk, without loading it into the primary memory (and, by the way, record it too), which generally erases the distinction between the two types of memory.

In secondary memory, data is usually written to a file. Most sequencers have their own proprietary format of this file, which makes it difficult to exchange arrangements created in different devices or programs. It was stated earlier that this was the main reason for the creation of SMF.

Time measurement
In fact, there are no "ticks" inside the sequencer. There is a hardware timer that generates pulses with a strictly constant frequency (for example, every microsecond). Forcing musicians to measure time in microseconds would be a monstrous mockery, as, indeed, in other units of real time (seconds, minutes). Musicians are used to thinking in bars and beats, and expressing time in relative units (note durations), depending on the current tempo.

"No problem," the manufacturers replied, "let them measure it as it is more convenient for them." Only the minimum unit of measurement will not be some 32nd duration, but a conventionally taken tick (the unit is even smaller, so that, for example, one thirty-second can contain 48 ticks). Since since the classical era, the pace has been measured by the number of quarters per minute (BPM, beats per minute), then they decided to take a quarter as the main duration and indicate the number of ticks per quarter - PPQN (Pulse Per Quarter Note). The larger the PPQN, the better the resolution of the sequencer and the more accurate in time it can capture messages during recording and output them to the MIDI output during playback. Most sequencers allow you to set PPQN arbitrarily - for example, from 32 to 1536 ticks per quarter (modern sequencers - up to 15360 PPQN).

A tick is a rate-dependent unit: the faster the rate, the shorter the interval between ticks in real-time units. This interval can be found by the formula in Fig. 1.

For example, at 120 BPM and 96 PPQN, ticks will follow every 5.208 milliseconds. At the same resolution and 180 BPM, the interval between ticks will be reduced to 3.472 ms. How does a sequencer count ticks if its internal timer pulses every microsecond? It's very simple: based on the current tempo and resolution in a quarter, exactly according to the specified formula. Since one millisecond contains 1000 microseconds, in the last example the sequencer will generate another tick when it receives 3472 pulses from the timer.

When high resolution doesn't make sense
If the sequencer and tone generator are "under the same roof" (a workstation or computer with a software sequencer and synthesizer on a sound card, or a virtual synthesizer), then the internal resolution of such a system can be arbitrarily high (15360 PPQN is impressive). This allows you to synchronize MIDI and audio data with sample accuracy. But as soon as we connect the sequencer and tone generator with a MIDI cable via a MIDI interface, high resolution becomes irrelevant.

Why? Let me remind you that one byte is transmitted via the MIDI interface within 320 microseconds. This means that, for example, a note-taking message (consisting of three bytes) will be transmitted for 960 μs, or almost a whole millisecond. Now imagine that in the sequencer at 120 BPM and 2048 PPQN, two notes are programmed with two ticks apart. In real time units, this is 488 microseconds. So: the tone generator will not be able to receive the second note 488 microseconds after the first, but in reality - only after 960 microseconds. So he will perform it after not two ticks, but almost four.

Hence the conclusion: when working via a MIDI interface (when the sequencer and tone generator are separated), the resolution of the sequencer more than one tick per 960 microseconds does not make sense. To find out how much it will be in PPQN, you can use the formula in Fig. 2.

The table in Fig. 3 shows PPQN values ​​for different tempo, which is pointless to exceed.

The position of an event on the timeline is set in the sequencer, usually in the "bars: beats: ticks" format, for example, 22: 3: 152. That is: the twenty-second measure, the third beat, the 152nd tick from the beginning of the third beat. This principle of timing (the English term - Timebase) is called musical, because it is familiar and convenient for musicians. Please note that you need to know the current time signature to work in this format. That is, how many beats the measure contains and what each beat is equal to.

So, with a 4/4 time signature, a beat is equal to a quarter, and a measure contains four beats. At 384 PPQN resolution, there will be 384 ticks in one beat, and there will be 1536 ticks in each tick (384 x 4). At 6/8 and the same resolution, one beat will be 192 ticks (an eighth is half as long as a quarter), and a beat will be six beats, or 1152 ticks (192 x 6). Thus, writing 22: 3: 152 in the first case means 35096 ticks from the beginning of the song (22 x 1536 + 3 x 384 + 152), and in the second - 26072 ticks (22 x 1152 + 3 x 192 + 152).

So, to determine the position of an event in real time units based on the "bars: beats: ticks" format, you need to know three parameters: the current tempo, time signature and resolution in ticks per quarter (PPQN).

There is another possibility of timing, when the position of an event on a track is expressed in absolute units that do not depend on the tempo, most often in the SMPTE time format - "hours: minutes: seconds: frames". This principle of timing is called "time-code-based" (timecode-based, absolute). The need for it arises when the sequencer is working together with a tape recorder or film / video equipment. Editing operations with film, video and audio material, specifying the positions of the beginning and end of the recording is more convenient to perform, being tied to an absolute scale, and not to measures and beats.

In this case, the coordinate of the event on the time ruler depends on the current tempo. So with a tempo of 120 BPM, the first beat of the second measure can have an SMPTE time of 00: 00: 02: 00, and with a tempo of 60 BPM - 00: 00: 04: 00. When an event is positioned within a frame (between seconds), its coordinate will also differ with a different frame format (number of frames per second). You can read more about SMPTE and MIDI Time Code in the previous article in the series.

Variable length quantities
Enough lyrical digressions, now our task is to understand the data storage format. And the first challenge that SMF developers faced was how to keep the timing of the event.

There are two options here: to store for each event the time from the beginning of the song, or from the last event before it (on the same channel). However, the first option is not rational, because most often the interval between events is small, neighboring events have execution times close to each other. So, in a passage of three notes, the first can have a time, say, 22: 3: 152, the second - 22: 3: 244, the third - 22: 3: 288. To store these numbers (translated into ticks from the beginning of the song), you need to reserve at least four bytes for each. If you go along the second path, then instead of three large numbers, you can save one large starting (22: 3: 152), and after it - two small ones, the difference in ticks between the first and second, and the second and third notes (in this case, 92 and 44), one byte is enough for them. But still, the problem remains: depending on the event, you need to allocate a different number of bytes to save time.

If SMF was being developed at the present time (and even by Microsoft, which generally cares little about the size of its files and the required memory), this problem would be turned a blind eye. We allocated a fixed field for saving time, say, 8 bytes per event, and did not suffer. However, in 1988, primary (RAM) memory was very expensive, every byte was counted, and the secondary (disk media) had a very modest size. Therefore, the SMF developers wanted to get the most compact format possible.

It was decided to keep delta time, that is, the difference in ticks between this event and the previous one (or the beginning of the song). For example, if the first event - the hitting of the note to the first octave - occurred at the time of 40 ticks from the beginning of the song, then its delta time will be 40. If after four ticks the note F is played, then its delta time will be 4. If two events occur simultaneously, then one of them is assigned a delta time equal to zero. If the event occurs exactly at the beginning of the song, it also has a delta time of zero. However, the next event can happen in an hour and a half (that is, in several million ticks). How to be in this case? After all, memory needs to be saved, and it is undesirable to allocate a fixed field of several bytes for delta time.

The so-called variable lengths... They provide a convenient way to write integers, from smallest to largest, without having to allocate a fixed number of bytes for the number. The bits of the original number are packed into one or more bytes: each byte has seven bits (on the right, bits 0 through 6). The most significant bit in a byte is service; all bytes in the series, except for the last one, must contain one, the last one - zero. Several packaging examples are shown in Fig. 4.

For example, you need to pack the number 64 (hex 0x40) into variable length format. In binary form, this number is written as 0100 0000. There are just seven significant bits, so this number is packed into one byte unchanged - 0100 0000 (it is also the last byte of the series), the most significant bit is 0.

Now the number is 128 (0x80). In binary form, it is written as 1000 0000. There are eight significant bits, so everything will not fit into one byte, you need to split it into two. The first byte must have one in the most significant bit, the second (as the terminating byte of the series) - zero. We put the seven least significant bits of the original number in the second byte, it turns out 0 000 0000. We put the remaining one bit (one) on the right side of the first byte - we get 1000 0001. As a result, the number 0x80 is written as two bytes: 0x81 0x00. Unpacking is very simple. We do not know in advance how many bytes are in the series. We read the first byte - 1000 0001. The most significant service bit (1) indicates that this is not the last byte of the series, there are more bytes. We discard the service unit, leaving seven bits - 000 0001. Read the second byte - 0000 0000. The most significant service bit (0) indicates that this is the final byte of the series (that is, there are only two bytes in the series). We discard the service bit. There are also seven bits left - 000 0000. We add to them on the left seven bits allocated from the first byte, we get 000 0001 000 0000. Discarding the first six zeros, we get the required number 1000 0000 (0x80).

So, the method of variable lengths allows different numbers of bytes to be allocated for different numbers: for numbers in the range from 0 to 127 - one byte, from 128 to 16383 - two bytes, and so on. The maximum number represented in this way is, in principle, not limited. However, in SMF, the burst length is limited to four bytes (three with the most significant bit set and one terminating with a zero). As a result, the maximum delta time can be 0x0FFFFFFF (or 268 435 455 ticks), which at a rate of 500 BPM and a resolution of 96 PPQN is about four days. More than enough!

In the form of variable length values, the SMF indicates not only the delta time, but also the length of some events.

Interchange File Format (IFF)
The structure of the standard MIDI file is almost entirely derived from the IFF (Interchange File Format), developed in 1985 by Electronic Arts. It is a data storage and exchange format that has made life easier for both users and software developers for nearly twenty years. Electronic Arts not only provided open source documentation, but also the C source code for reading and writing IFF files.

The IFF format is backward compatible and extensible. The former means that the new version of the program can read files created by the previous version without any problems. Second, you don't need to invent a new format to store additional information; it is enough to enter your own extension into the IFF. The structure of the format allows programs from different manufacturers to exchange data that do not have appropriate business agreements among themselves. All this pleases the users - having saved the data in the IFF format, they are no longer chained to the closed format of their system and can use the data in any IFF-compatible software and hardware environment.

An IFF file is a collection of data organized in such a way that different, unrelated programs can read it. On the other hand, the program can store specific information in the IFF that is meaningful only to itself. The IFF structure makes this easy. Other programs that do not know how to handle such information can ignore it without compromising the reading of the main content.

There are several types of IFF files. For example, ILBM and GIFF files contain graphic information, SMUS files contain musical notation, and AIFF and WAVE files contain digital audio.

An IFF file is made up of similar elements called chunks. A block is a data structure consisting of an alphabetic identifier (four ASCII characters), a block size (four bytes), and the data itself (Figure 5). It is convenient to think of a block as a shell in which the data is "wrapped". The data itself can contain anything: graphics, text, animation, sound, a set of 3D objects, and so on.

Blocks in the IFF file can be nested, fig. 6. In fact, an IFF file is nothing more than a top-level block containing one or more other blocks inside it. This principle of data storage allows you to "wrap" several heterogeneous data into a file, including several IFF files, which already resembles a file system inside a file. True, with nested data organization, there is one drawback - the file becomes difficult to interpret, to isolate blocks from it.

Most IFF files contain a top-level block with the identifier "FORM". It includes other blocks (Fig. 7). The only data in the FORM block is four bytes describing the file type (eg "ILBM", InterLeaved Bit Map). Immediately behind these are nested blocks such as "BMHD" (image header), "CMAP" (palette), and "BODY" (pixels themselves). The names of the blocks and the data format are invented by the developer of the specific file type. Other programs, if they come across a block with an unfamiliar name, can safely skip it, guided by the field containing the block length.

All numeric data in IFF files are stored in big-endian order, that is, the most significant byte of the number (MSB) is stored first, then the least significant byte. See the sidebar for more on this. Blocks within a file must always start with an even byte. If the previous block contains an odd number of bytes, it is padded with a null byte to be even.

From which end to save?
Computer memory consists of cells, each containing exactly one byte. To access a cell (write or read a byte), the processor uses the so-called address in mind. It is simply an integer assigned to a cell by the operating system (may the computer experts forgive me for this oversimplification). In real life, one byte is usually not enough. Even to store integers, words are used, that is, groups of two bytes, double or quad words (respectively, four or eight bytes, see the first part of the cycle for more details). That is, the number is stored in several adjacent bytes.

In fig. 8 shows two possible ways of placing them in memory, using the example of a double word. The first way - bytes are stored in memory sequentially, the most significant byte at the smallest address. That is, the MSB of the high word is stored at address N, then the LSB of the high word (N + 1), the MSB of the low word (N + 2), LSB of the low word (N + 3). This method is usually called big-endian(or "direct byte allocation"). In the second method, everything is exactly the opposite, the high byte is stored at the highest address: LSB of the low word (N), MSB of the low word (N + 1), LSB of the high word (N + 2), MSB of the high word (N + 3) ... This method is usually called little-endian- "reverse byte allocation".

That is, the difference is "from which end" the multibyte value is stored. The terms "big-endian" and "little-endian" were coined in an article on the subject with reference to Jonathan Swift's book, The Adventures of Gulliver. As you know, a movement of Big-Endians arose in Lilliput, who did not want to carry out the emperor's decree ordering to break boiled eggs only from the sharp end. In the computer world, the big / little-endian confrontation looks very similar.

Little-endian proponents argue that the rearranged byte order in memory makes it easier to perform arithmetic operations on multibyte values, since the least significant bytes added first are stored in the least significant bytes.

The little-endian circuit is used in Intel compatible processors ranging from the Intel 8080 to the Intel Pentium IV. Direct placement (big-endian) - in Sun Spark processors, Motorola 68000 (early line of Apple computers) and many RISC processors. But the PowerPC and Intel Itanium processors understand both data formats at once (they are sometimes called "bi-endian").

However, the important thing is not so much how the computer stores data "inside itself", but how it stores it "outside", in files. This is much more important from a practical point of view. For example, if the word "UNIX" is saved to a big-endian file by the system (as two double-byte words), then the little-endian system will read it as "NUXI". This is what computer jargon calls the "NUXI problem." Similar difficulties can arise when saving graphics because colors are encoded with multibyte numbers. For example, Adobe Photoshop and JPEG files use the big-endian scheme, while GIF and BPM files use little-endian.

The "non-platform" Standard MIDI File (SMF) format uses the big-endian method, that is, the most significant byte of a word (MSB) is stored first.

SMF structure
Standard MIDI files, like IFF files, are made up of Chunks. There are two types of chunks in total: Header Chunk and Track Chunk. There can be only one header block and one or more track blocks in an SMF file. The block has a typical IFF structure: the first four bytes are the identifier, the next four bytes are the block length in bytes, excluding the eight bytes type / length. The header block identifier is four "MThd" characters, and the track block identifier is four "MTrk" characters. This structure will allow new block types to be defined in the future, and an unfamiliar block can be easily ignored based on its length. The SMF specification warns: "Programs should be prepared to ignore blocks of unknown types when they encounter them."

The header block contains general information about the file, the track block contains the stream of MIDI messages with timestamps. In addition, the MIDI file stores additional information necessary for sequencers: tempo, time signature, key, metronome settings, and the like. This information is not transmitted via the MIDI interface, and the events that form it are called meta-events.

A MIDI file always starts with a header block followed by one or more track blocks (Figure 9). That is, any standard MIDI file starts with the four letters "M", "T", "h", "d". This means that the MIDI file does not comply with the IFF specification (which requires that every IFF-compliant file begins with a top-level block of one of three types - "FORM", "CAT" or "LIST"). There are other differences: SMFs cannot contain nested blocks, and the block length does not have to be even. However, converting an SMF to an IFF compliant file is straightforward. It is enough to pad the blocks of odd length with a zero byte (if any) and put all the contents in the FORM block. A similar operation is used in the RMID format proposed by Microsoft (see sidebar).


You "re here because you have a file that has a file extension ending in .smf. Files with the file extension .smf can only be launched by certain applications. It" s possible that .smf files are data files rather than documents or media , which means they "re not meant to be viewed at all.

what is a & nbsp.smf & nbspfile?

Files in the SMF format contain audio data with effects, and this file format is integrated with similar technologies and functionalities as files with the MID extension. Audio tracks with the .smf extension can be played using the Apple QuickTime application, and this multimedia program has a version compatible with Microsoft Windows-based systems aside from another version developed for Mac users. The MIDI Manufacturers Association integrated MIDI specifications into the SMF file format during its development. This means SMF files can also contain different tracks combined from different audio tracks stored in several SMF files, which also means files in the .smf format can be combined and converted into one audio track in more popular formats that can be viewed and used with more digital video and document presentation development software, multimedia applications and digital audio players. This provides users with a means to separately add effects to each track and make modifications on others before combining them to play as a single audio track. Some of these effects and modifications may include volume and pitch adjustments, distortions and reverb, panning and timing edits among others. There are third party applications that can convert SMF files into the MIDI format for wider cross compatibility support for more audio editing applications.

how to open a .smf file?

Launch a .smf file, or any other file on your PC, by double-clicking it. If your file associations are set up correctly, the application that "s meant to open your .smf file will open it. It" s possible you may need to download or purchase the correct application. It "s also possible that you have the correct application on your PC, but .smf files aren" t yet associated with it. In this case, when you try to open a .smf file, you can tell Windows which application is the correct one for that file. From then on, opening a .smf file will open the correct application.

applications that open a .smf file

Apple QuickTime Player

Apple QuickTime Player

Apple QuickTime Player is a multimedia player software that handles a variety of files of different formats from digital photos to panoramic images, audios to videos as well as interactivity. This multimedia player program is available for Mac OS X computers as well as later versions of Windows computers. This software product by Apple has Software Development Kits or SDKs which is available to the public as long as subscribed with the Apple Developer Connection or ADC. It has QuickTime framework, which is compatible with other free player applications, that provide several functions. These include the encoding of audios and videos, transcoding of those same files, decoding with the option to send a decoded stream to graphics subsystem or audio subsystem, and a component plugin architecture to support other codecs (third party like DivX). The latest version of this software is QuickTime Player 7 which is downloadable for free for Mac and Windows computers.

a word of warning

Be careful not to rename the extension on & nbsp.smf & nbspfiles, or any other files. This will not change the file type. Only special conversion software can change a file from one file type to another.

what is a file extension?

A file extension is the set of three or four characters at the end of a filename; in this case, & nbsp.smf. & nbspFile extensions tell you what type of file it is, and tell Windows what programs can open it. Windows often associates a default program to each file extension, so that when you double-click the file, the program launches automatically. When that program is no longer on your PC, you can sometimes get an error when you try to open the associated file.


Usually sequencers use their own arrangement storage format. This is due to the fact that a data structure designed for the capabilities of a particular program is much more efficient, it is simply easier to work with it. You can write additional data into your format, for example, on customizing the user interface (position and size of the window, font, and so on). In addition, the compactness of standard MIDI files (in particular, variable lengths for storing the time of occurrence of events) turns into an inconvenience: to work with the arrangement, all delta times in the file must be "unpacked", and when the file is saved, "zipped" again.

On the other hand, SMF is a portable, cross-platform format, in which you can define any additional blocks to store specific data. For example, one sequencer can store the metronome on or off in a block named “Mtr”. This block is not a hindrance to another sequencer; it can define several of its specific blocks in the same file. So some sequencers use the SMF format directly, it is "native" for them. Others let you import and export MIDI files as needed.

To support different types of sequencers and other equipment, standard MIDI files are classified into three flavors or formats: 0, 1, and 2.

File format 0 contains one track, which contains events from all sixteen MIDI channels. This is the simplest format for exchanging data, since it does not take into account the original structure of the tracks in the sequencer (which track is assigned to which MIDI channel). Format 0 file is better suited for transferring data to devices such as mixers and effects processors than for storing arrangements. When recording a file in format 0, the sequencer simply merges all messages from all MIDI channels into one track. Accordingly, when loading a file, we get one track, on which it is problematic to edit events, since events for different channels are interspersed with each other. Most sequencers have the function of dividing such a "mix" into separate tracks, each of which contains events for one MIDI channel.

Format 1 file contains a separate track for each MIDI channel, which reflects the familiar structure of an arrangement in a sequencer. Format 2 file contains several independent pieces (or complete patterns), each pattern consists of one track containing messages on all 16 channels. This format was supposed to be used in those sequencers that can work with independent patterns played by several instruments at the same time. However, Format 2 has been widely ignored and is currently considered in the specification as "not intended for sequencers".

One of the main differences between 0 and 1 formats is the way meta events are placed. In format 0, the tempo and time signature meta events (called the tempo map) are mixed with other MIDI messages. In addition, track titles are not saved in this format. In format 1, the first track in the file is reserved exclusively for the tempo map and other meta-events such as Sequence / Track Name, Sequence Number, Marker, SMPTE Offset (see below).

If there is no tempo map in the file, the tempo is assumed to be 120 BPM, and the time signature is 4/4.

The MMA organization may develop other SMF formats in the future to support new data structures in sequencers.

Title block ("MThd")

The header block contains basic information about the file. The block structure is shown in Fig. 11. The length field always contains the number 6, based on the number of bytes of header data following this field. Header data is three 16-bit words. The first word (format) - SMF format, can take one of three values ​​- 0, 1 and 2. The second word (ntrks) - the number of track blocks (that is, the tracks themselves) in the file. For a file of format 0, it will always be equal to one.

The last word of the division heading block specifies how time is measured (timebase). As mentioned earlier, there are two ways: musical (bars / beats) and absolute (time-code-based), based on absolute time in SMPTE format. In any case, the delta time in the SMF file is measured by ticks: with the musical method, the number of ticks per quarter (that is, PPQN) is set, with the absolute one, the number of ticks in one SMPTE frame. If the most significant (15th) bit of the division field is set to zero, then the musical method is used, and the remaining 15 bits contain PPQN (up to 32767), Fig. 12. If the most significant bit is set to one, then the absolute mode is used. The low byte (bits 0 through 7) stores the number of ticks per frame, the high byte (bits 8 through 15) stores the SMPTE frame format, expressed as negative values ​​(-24, -25, -29, -30). In this case, the number -29 corresponds to the 30 fps Drop Frame format (see the previous article in the cycle).

Negative numbers are chosen because they are written as two's complement (see the previous article), that is, they contain one in the most significant bit. And this unit is just a sign of the absolute way of counting time. The number of ticks per frame is stored positive and usually takes one of the following values: 4 (resolution as in MIDI Time Code, when there are four Quarter Frame messages per frame), 8, 10, 80 (resolution of one bit in an SMPTE frame) or 100 ...

This system allows you to indicate the absolute time of occurrence of the event with an accuracy of 1/128 frame. In addition, if you set the frame format to 25 fps and the resolution to 40 ticks per frame, then each tick will correspond to one millisecond. The division field in this case will have the value 0xE728, byte 0xE7 is a two's complement number -25, and 0x28 is 40 in hexadecimal notation.

Track block ("MTrk")

The track block stores the events themselves, that is, MIDI messages with a time stamp. The block must contain at least one event. The structure of the track block is the same for MIDI files of any format (0, 1 and 2), Fig. 13.

The event consists of a delta time and the MIDI message itself, Fig. 14. Let me remind you that delta time is stored as a variable length.

We hope we helped you solve the problem with the SMF file. If you do not know where you can download an application from our list, click on the link (this is the name of the program) - you will find more detailed information regarding the place from where to download the secure installation version of the required application.

Visiting this page should help you answer specifically these, or similar questions:

  • How to open files with SMF extension?
  • How can I convert a SMF file to a different format?
  • What is the SMF file format extension?
  • What programs support the SMF file?

If after viewing the stuff on this site, you have still not received a satisfactory answer to any of the above questions, this means that the information regarding the SMF file presented here is not complete. Contact us using the contact form and write what information you did not find.

What else could be causing the problem?

There may be more reasons why you cannot open an SMF file (not only the absence of a corresponding application).
At first- The SMF file may be incorrectly linked (incompatible) with the installed application to serve it. In this case, you need to change this link yourself. To this end, right-click on the SMF file you want to edit, click on the option "To open with" and then select the program you have installed from the list. After such an action, the problems with opening the SMF file should completely disappear.
Secondly- the file you want to open may simply be damaged. Then, the best solution is to find a new version, or download it again from the same source as before (maybe for some reason in the previous session the download of the SMF file has not been completed and it cannot be opened properly).

Do you want to help?

If you have additional information about the SMF file extension we will be grateful if you share it with the users of our site. Use the form provided and send us your information about the SMF file.