Skip to content

Latest commit

 

History

History
118 lines (69 loc) · 3.79 KB

README.md

File metadata and controls

118 lines (69 loc) · 3.79 KB

Explanation for Scratch 3 MIDI

This extension is for using a MIDI device like a MIDI Controller through Scratch3. It's made by Web MIDI API. This API is one of the HTML5 functions defined by W3C.

Application page is Web MIDI Scratch 3

Reference

Preparation

Please Use Chrome. This extension is able to use only on Chrome. The other browsers are not supporting Web MIDI API now, April 2016. Do you know MIDI? MIDI is a protocol for connecting between MIDI Devices or a MIDI device to the PC. If you don't know, please see like a following page.

Before you try to use these extensions, you should connect a MIDI device to your PC via USB. After you connect a MIDI device, you launch Chrome browser. Because Chrome browser finds the MIDI device when it launches.

Usage

  • Open Scratch 3 Editor from here
  • Push the under-left icon.

alt

  • Select Web MIDI Extension form Extension list

alt

  • You can find Web MIDI blocks under the block paret.

alt

HAT Block

  • alt indicates all midi event

  • alt indicates note on event

  • alt indicates note off event

  • alt indicate pitch bend event

  • alt indicate program change event

  • alt indicate control change event

  • alt indicates note on event with note number

reporter block

  • alt Note Number

  • alt Velocity

  • alt Pitch Bend

  • alt Control Change Value

  • alt Program Number

Boolean reporter

  • alt MIDI event

    • 'key on' --- key on event
    • 'key off' --- key off event
    • 'cc-chg' --- control change event
    • 'p-bend' --- pitchbend event
    • 'pg-chg' --- program change event

Note On/Off Message

  • alt
    Generates a MIDI NOTE ON message. The first parameter is a channel number, the second one is a note number and last one is a velocity. Normally the velocity is zero means note off.
  • alt
    With duration (continuous time), Generate a MIDI NOTE ON message. The last message is duration. The other parameters are same as above.
  • alt
    Generates a MIDI NOTE OFF message. The first parameter is a channel number, the second one is a note number and last one is a note off velocity. However few instrument adopt note off velocity.

Program Change Message

  • alt
    First parameter is a channek number, the second one is program number.

MIDI Output Device Number Select

  • alt
    This message is a special message to select MIDI Output Device. If multiple MIDI devices are connected by your computer, you can select which device you send MIDI message.

BEAT

The bellow messages are for "beat" and tick".

  • alt

"beat" means timing signal of a quarter note. This hat code generates a pulse for each beat. And the parameter means Tempo. Tempo means the number of quarter notes while one minute. In this case, tempo=120, one time of each 500msec, the pulse is generated.

  • alt

"tick" indicates a position of inside of a bar. In this extension, a quater note is as 480 ticks. So one bar is 1920 ticks. This reporter block displaies from 0 to 1920 cyclically..

  • alt
    Wait for time of parameter ticks to run the next command.