5.7: Brain peak MIDI

 
 

IBVA used "Apple MIDI manager" since it's starting.

After that other company made "OMS" and other interface for MIDI.

New MIDI interface "Core MIDI" is much better connection for external device and inter application communication.

IBVA4 used this new MIDI communication protocol.


Its easy to connect MAX, Garage Band, other applications and external entities via Core MIDI virtual MIDI port: IAC (Inter Application Communication).

You can create a different setup (1 to 128) for each different IBVA Data channel (1 to 4 and coherence) in "Brain peak MIDI".

Each IBVA data channel can translate MIDI in a different way and can send MIDI to a different MIDI port with a different MIDI Out Tempo.


MIDI hardware connection.

To play MIDI sounds via an external MIDI entity, or to send MIDI to an external MIDI entity like a lighting control system, mixing console, etc., need to install USB MIDI driver and hardware for connecting to the external MIDI device.

Then you can setup "Audio MIDI Setup” in the Application/Utilities folder.

If you want to send MIDI to MAX, Garage Band and other application s via the virtual MIDI port then there is no need to setup like this.


* Virtual MIDI port:

If you choose to run the MAX application then it will create its own virtual MIDI port, even if you are not using MIDI.

So you need to update and/or reload the MIDI port in order to access this port.

IBVA4 creates its own virtual MIDI port called "IBVA" when you setup in the Preferences "Brain peak MIDI" and/or "Brain rhythm MIDI".

If you have not setup the Preferences "Brain peak MIDI" and/or "Brain rhythm MIDI" then IBVA4 will not create its own virtual MIDI port.

Garage Band does not create its own virtual MIDI port. All MIDI ports automatically connect to Garage Band.

Garage Band always monitors the MIDI port connected.

To send MIDI from IBVA4 to Garage Band you must select MIDI Out port "IBVA" in the IBVA4 application. No need to setup anything further in Garage Band.



MIDI play is 100 % independent from Graphic windows update speed.

Always 10 m sec timing to play each setup.




5.7.1: Open Preferences, click "Brain peak MIDI".


Current "Setup" is for NO 1. A maximum of 128 different ways of setting all the windows information. Information will be stored in a Brain Note file, when you save.

To change the selected setup, you must type a number in the setup number field or you can use the setup stepper or the popup menu.

Type the name in to the setup name field then press the 'Enter' key – this creates the name for this setup and will show it in the Setup popup menu.


Turn ON "Play AU DLS Synth".

Turn ON "ON MIDI out".

Then IBVA4 will start playing MIDI sound with Tempo 120 as default setup. To change the Tempo use the slider or type a number in the Tempo field or use the popup menu.

To change a MIDI Instrument click "Pick Instrument" or you can type a number in the Program Change field or you can use the stepper or popup menu.

Move the slider "Peak frequency" so you can test the input peak frequency translation into MIDI Pitch numbers as the output sound changes.

Translation adjustment is done by typing a number in the MAX, MINI frequency field and Number A, Number B field or by using the slider to setup a number.


Default play peak mode is "Play note only when peak in the selected frequency range"

Input slider range is 0 to 60 Hz. You can adjust the selected MINI and MAX to play a peak frequency range, "Set Frequency range" or type a  number in the MAX and MINI frequency field or use the slider to setup a number.

MIDI play changes only happen when the input slider range is in this MAX and MIN range.

Move the slider and see how the translation changes happen.


Select "Play note only when peak in the selected frequency range"

Input slider range is 0 to 60 Hz. You can adjust the selected MINI and MAX to play a peak frequency range, "Set Frequency range" or type a  number in the MAX and MINI frequency field or use the slider to setup a number.

Then move the slider "Peak frequency" so you can test how the input peak frequency translates into MIDI Pitch numbers as the out put MIDI sound changes.


Turn ON "Active Brain data Input" to start translating actual brain wave peak data into MIDI Notes.

IBVA4 will start to play MIDI from the brainwave peak frequency and power. If the peak power input is too low, then you must adjust the MAX power number to a lower value.


Select "Play only when pitch changed" will set MIDI output changes to happen only when the brain wave peak frequency changes.

Try different "Tempo", "Program Change = Instrument", "Set frequency range" to play MIDI sound.


This way there is no need to connect any external device to the Mac.

If you like to play an external device then select it by opening "MIDI out port" popup menu.

Port name depends on USB MIDI interface setup in "Audio MIDI Setup".

If you select to "Play AU DLS Synth" and select "MIDI out port" then MIDI will play simultaneously – the internal Mac sound and other MIDI connecting sound.

If you select to "Play AU DLS Synth" from "MIDI out port" popup menu and you have not selected "Play AU DLS Synth" button then it will only play from the internal Mac sounds.


You can select "Use IBVA data" from CH 1 or CH 2 or the Coherence by the popup menu to select use of the peak.

If you change MIDI connections, such as  running the MAX application, you will need to quit MAX application, connect or disconnect external MIDI entity, then need to click "Reload MIDI port".

Then it will show the new port name in the "MIDI out port" popup menu.

If using Coherence you need to select peak mode to "Use peak in the BS total count at BS CH:" or "Play only when peak BS total count in the selected range".

Because Coherence number changes happen 0 to 100 % it is a very different way than peak power changes. Need to use Brain switch (BS) function.


See 11: New Brain Note, 13: Brain switch mixer setup, 14: Brain SW inspector for this function detail.


Output number will be translated by selecting "MIDI Pitch", "MIDI Velocity", "MIDI Channel", "MIDI Program Change", "MIDI Pitch Bend", "MIDI Control Change V" and "MIDI Control N".

In case you like to set any number to this MIDI message, then change "Number A" and "Number B" to the number you wish to send or use for MIDI message.

.

  * When selecting "Active Brain data Input", in the input peak frequency field, the number and slider will automatically change sometimes, but not every time (?).

MIDI play will however remain continuous. To always see the numbers and slider changing you need to set "MIDI out Tempo" to ‘real-time’.

* If you keep playing the same MIDI note for a long time (when actual brain wave play usually doesn't happened like this. just happened when test MIDI internal sound play), the internal Mac sound will stop. MIDI sent to an external device will continue, no stop.

* When using internal Mac MIDI sounds (AU DLS synth), the MIDI Channel works 1 to 16. Each MIDI Channel can be setup for a different Instrument; this means maximum 16 different instruments can be played from the internal Mac as MIDI sounds. MIDI Channel 10 works for Drum play.






















Two "Brain peak MIDI" shows setup 1 and 2 connected left and right brain wave peaks.

Can see this peaks in the Waterfall window.






5.7.2: other files for test MIDI communication:


IBVA4/MAX MIDI patch sample


Files included:

MIDIkeyTest2: MAX application for test "Brain peak MIDI", virtual MIDI port: IAC (Inter Application Communication)

MIDI Channel LED2 : MAX application for test "Brain rhythm MIDI", virtual MIDI port: IAC.



Sample MAX application MIDIkeyTest2 shows how works this function.

You need to select the name of the same virtual MIDI port as in the "Brain peak MIDI" and "MIDIkeyTEst2".

For example setup for Brain Data Channel 1 select virtual MIDI port "MIDIkeyTEst2 1",

Brain Data Channel 2 select virtual MIDI port "MIDIkeyTEst2 2",

Brain Data Channel 3 select virtual MIDI port "IBVA",

Then send MIDI data to each keyboard.


Within MIDIkeyTest2 application, you can see MIDI note, velocity, channel, and program change number.

Other application and/or system can use brain wave peak data to do many things; such as control Quick time movie, movie effect, sound effect, 3 D space sound effect, control Laser animation, control lighting, etc.


* Velocity number in this MIDIkeyTest2 is generated by MIDI keyboard object in the MAX. it's shows always 64.

This number is not the velocity number send from IBVA4.




This keyboard makes few notes that depend on incoming Note number.





In case you change MIDI entity connection and/or run an application which creates a virtual MIDI port like MAX, then click "Reload MIDI port". The name for the current connecting port will now be shown.


"Brain peak MIDI" will work with "Brain rhythm MIDI". This means controlling other application and/or system and playing MIDI sounds with brain peak happens simultaneously.

You can play sounds by brain peaks and make sound effects to use brain rhythm.






5.7.3: Sample MIDI test screen.


No need to connect any MIDI hardware to test this way.

Open 3 preference "Brain peak MIDI" window, make size small (click small triangle at Left side of window).

send MIDI to MIDIkeyTest2 from each setup window.

this way it is easy to explain how each preference setup sends MIDI to other applications.

you can move slider in each preference, to see how MIDI data goes to MIDIkeyTest2.

after all preferences are closed, MIDI data will continue to be sent to MIDIkeyTest2.

You can test with only one preference window open or many window open, and can send MIDI to many number of applications and external MIDI device simultaneously.

* Update speed to send MIDI depends on Mac system speed and the amount of IBVA4's windows open.


* Note velocity Number from MIDIkeyTest2's keyboard is 64, which is created with MAX keyboard. Velocity number is not  from IBVA4.

 

5.7.0: About Core MIDI