Data AcQuisition And Real-Time Analysis
Scope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
The following is from the Daqarta Help system:



Spectrum Analyzer

Signal Generator

(Absolutely FREE!)


Pitch Tracker


DaqMusiq Generator
(Free Music... Forever!)

Engine Simulator

LCR Meter

Remote Operation

DC Measurements

True RMS Voltmeter

Sound Level Meter

Frequency Counter
    Spectral Event

    MHz Frequencies

Data Logger

Waveform Averager


Post-Stimulus Time
Histogram (PSTH)

THD Meter

IMD Meter

Precision Phase Meter

Pulse Meter

Macro System

Multi-Trace Arrays

Trigger Controls


Spectral Peak Track

Spectrum Limit Testing

Direct-to-Disk Recording



Frequency response

Distortion measurement

Speech and music

Microphone calibration

Loudspeaker test

Auditory phenomena

Musical instrument tuning

Animal sound

Evoked potentials

Rotating machinery


Product test

Contact us about
your application!

MIDI Buffer Copy Command

Changes: BCvb.i0=vb(i1,i2)

The Buffer Copy (BC) command allows a MIDI Changes script to copy one section of an input buffer to another section of the same or different buffer, in the same or different Voice.

You can then use Set Pointers to set the start and end note positions, and Input Select to use that buffer instead of the live input stream.

The format for Buffer Copy is BCvb.i0=vb(i1,i2), where the left side is the target and the right is the source. v is Voice number 1-8, and b is buffer number 1-4. i0 is the target index (position) where the copy should start, and (i1,i2) are the start and end positions in the source. If i1 is greater than i2 then the copy will be a reversed version of the source.

Positions i0, i1, and i2 may use any unsigned integer or valid expression, including current MIDI control values, random values, current computer keyboard states or mouse position, input or buffered notes, oscillators, and User Variables. Values will be limited to the 0-255 buffer position range.

To copy from the live input, use 0 as the source buffer number. (You can't copy to the live input, so this must appear only on the right side.) Important: The live input buffer holds the most recent 256 notes. Before you copy a series of notes from it, you will probably want to insure that your performance has been going on long enough to update that much of the input buffer. Otherwise, you will get old notes left over from a prior performance (or nulls if this is the first one).

Also note that when copying from the live input, the 0th index value is the current note after any Note Delay for the specified voice (so it may not really be "live" compared to the overall incoming Pitch Track signal). The index values should be interpreted as notes ago, so (0,5) means "from the current note to 5 notes ago". Reversing the order to (5,0) will copy the notes in the same order they were received.

You can use negative numbers for live-input index values. If Note Delay is non-zero (and big enough), these refer to notes before the current input note for that voice. If Note Delay is less than the absolute value of a negative index, the index will "wrap" to old notes. For example, if Note Delay is 0, an index of -1 refers to 255 notes ago.

The Buffer Copy command also allows a limited ability to copy Velocity, Note, or Chord Patterns, designated by V, N, or C instead of a buffer number. Alternatively, you can use P (Pattern) to copy all three at once.

(Remember that only working copies of the pattern are involved here, so you can't see the pattern change in the relevant Voice setup dialog.)

The P option can only copy overall Patterns (Velocity, Note, and Chord copied as a set) between different voices, or within the same voice (for sections of the pattern set). No buffers are involved.

Note Patterns may be copied to and from the same or other Note Patterns, or to any buffer of any voice. The live input may be used as the source, but not the destination.

Likewise, Velocity Patterns can be copied to and from the same or other Velocity Patterns or buffers, and Chord Patterns can be copied to or from Chord Patterns or buffers.

Percussion Velocity Patterns can be copied within the same pattern, between other Percussion Velocity Patterns, or to or from Voice Velocity Patterns or buffers. To refer to Percussion, use A through F instead of Voice number 1-8. For example, BCBV.0=AV(0,7) copies the first 8 Velocity characters from Percussion Velocity A to B.

When copying a Note Pattern to a buffer, the pattern characters are translated into MIDI notes such that a 'C' becomes C4 (MIDI note 60), a 'd' becomes D-flat 4 (MIDI note 61), etc. The current Pattern Key is ignored at this step.

Note that during the above operation, "Blue" notes ('+' or '-' symbols) will be discarded and replaced with C4.

If the buffer notes are later copied back to a Note Pattern and played, the Pattern Key will be applied. The same buffer notes can be copied to Note Patterns of different voices, where they will be played relative to the Pattern Key of each voice.

If the buffer notes are played directly from the buffer (by using the Set Pointers command) then the Pattern Key is ignored.

See also Changes Script Buffer Operations, Changes Script Overview, Changes Script Editor, MIDI Voice Setup Dialogs, Pitch-to-MIDI dialog, Pitch Track Toolbox - Overview


Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
Over 30 Years of Innovative Instrumentation
© Copyright 2007 - 2017 by Interstellar Research
All rights reserved