Daqarta
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:

Features:

Oscilloscope

Spectrum Analyzer

8-Channel
Signal Generator

(Absolutely FREE!)

Spectrogram

Pitch Tracker

Pitch-to-MIDI

DaqMusiq Generator
(Free Music... Forever!)

Engine Simulator

LCR Meter

Remote Operation

DC Measurements

True RMS Voltmeter

Sound Level Meter

Frequency Counter
    Period
    Event
    Spectral Event

    Temperature
    Pressure
    MHz Frequencies

Data Logger

Waveform Averager

Histogram

Post-Stimulus Time
Histogram (PSTH)

THD Meter

IMD Meter

Precision Phase Meter

Pulse Meter

Macro System

Multi-Trace Arrays

Trigger Controls

Auto-Calibration

Spectral Peak Track

Spectrum Limit Testing

Direct-to-Disk Recording

Accessibility

Applications:

Frequency response

Distortion measurement

Speech and music

Microphone calibration

Loudspeaker test

Auditory phenomena

Musical instrument tuning

Animal sound

Evoked potentials

Rotating machinery

Automotive

Product test

Contact us about
your application!

MIDI Buffer Copy Command


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

Introduction:

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.

Alternatively, you can copy to, from, or between main macro buffers Buf0-Buf7 or string arrays Str0-Str7. (See below.)


MIDI-to-MIDI Copies:

The format for Buffer Copy between MIDI buffers 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.


Macro Buffer or String Array Copies:

As mentioned in the Introduction, you can make use of main macro buffers Buf0-Buf7 or string arrays Str0-Str7. To copy from a macro buffer N to MIDI buffer b of voice v, use BCvb.i0=mN(i1,i2). To instead copy from a string array N, just change the 'm' to 's': BCvb.i0=mN(i1,i2).

All the same index rules apply, except that the index range for macro buffers is 0-1023, and for string arrays it is 0-2047.

Similarly, you can copy from a MIDI buffer to a macro buffer or string array via BCmN.i0=vb(i1,i2) or BCsN.i0=vb(i1,i2).

You can copy between buffers or string arrays using the same general format rules. For example, to copy from a macro buffer to the same or another macro buffer, use BCmN.i0=mN(i1,i2). (The buffer numbers N may differ.)

You can also copy from macro buffers or string arrays to MIDI Velocity or Chord buffers (but not Note or Pattern) by using V or C as the MIDI buffer number. For example, BC1V.0=m0(20,39) copies from macro Buf0 indexes 20-39 to the start (index 0) of the Velocity buffer of MIDI Voice 1.


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

GO:

Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
INTERSTELLAR RESEARCH:
Over 35 Years of Innovative Instrumentation
© Copyright 2007 - 2023 by Interstellar Research
All rights reserved