Strumenti Digitali Digital Tools

PROTOCOLLI
DI COMUNICAZIONE
COMMUNICATION
PROTOCOLS

MIDI  ·  OSC

MIDI

Musical Instrument Digital Interface

È un protocollo formato da un insieme di messaggi e di regole per la comunicazione tra strumenti musicali e non solo. MIDI, short for Musical Instrument Digital Interface, is a standardized protocol consisting of messages and rules for communication between musical instruments and other digital interfaces. It is not audio.

MIDI

Il primo strumento ad utilizzare il protocollo MIDI è il Sequential Circuit Prophet 600 del 1983.

Nonostante svariati tentativi di modificare il protocollo, la sua struttura è rimasta praticamente la stessa a conferma che è un linguaggio molto potente, facile da programmare e che non richiede una tecnologia complessa e di difficile reperibilità.
The first instrument to use the MIDI protocol was the Sequential Circuits Prophet 600 from 1983.

While the MIDI 2.0 update in 2023 was substantial, MIDI's structure remains conceptually the same, proving its value as an easy-to-program language that does not require complex hard-to-find technology.

Sequential Circuits Prophet 600

Via cavo si trasmette Cables

MIDI 5-pin
con cavi dedicati a 5 poli standard 5-pin MIDI connector
USB MIDI
con cavi USB
(talvolta anche Firewire o LAN)
USB cable

Si può anche trasmettere Can be also transmitted

MIDI virtual
virtualmente tra software
con software di bridge quali MIDI Yoke (PC)
o usando i Driver IAC (Mac)
Virtual software connections
Bridge software like MIDI Yoke (PC)
or using Driver IAC (Mac)
MIDI WiFi Bluetooth
WIFI o Bluetooth LE
(Low Energy, sui nuovi Mac)
Su PC, Mac, Linux, iOS, Android...
WIFI or Bluetooth LE
on PC, Mac, Linux, iOS, Android...

Tipi di
messaggio
Types of
messages

Channel Voice Message

Messaggi di canale Channel messages

Possono essere indirizzati su uno dei 16 canali (Channel) disponibili Control the parameters that are needed to convert musical events into MIDI and can be routed to one of the 16 channels available in MIDI

System Message

Messaggi di Sistema System messages

sono indirizzati globalmente all'intero sistema apply globally within the system and not to a specific device

status: NOTE ON  |  1° data byte: NOTA  |  2° data byte: VELOCITY

NOTA ON – se si preme una nota sulla tastiera, viene inviato un messaggio di Nota On che, oltre allo status byte, è costituito da due data byte: il primo relativo all'altezza della nota (pitch 0–127), il secondo alla velocity ovvero alla forza con cui è stato premuto il tasto (velocity 0–127). NOTE ON – When a key is pressed on the keyboard, a Note ON message is sent, consisting of two numbers: pitch (0–127) and velocity (0–127).

MIDI Note On

status: NOTE OFF  |  1° data byte: NOTA  |  2° data byte: VELOCITY

NOTA OFF – se si rilascia il tasto di nota premuto in precedenza, viene generato un messaggio di Nota Off costituito anch'esso da due data byte; il primo specifica quale nota viene rilasciata (pitch 0–127), il secondo con quale velocity di rilascio del tasto (velocity 0–127). NOTE OFF – When the key that was previously pressed is released, a Note OFF message is generated that also consists of two numbers: pitch (0–127) and velocity (0–127).

MIDI Note Off

status: AFTERTOUCH  |  1° data byte: VALORE AFTERTOUCH

AFTERTOUCH o CHANNEL PRESSURE – trasmette in tempo reale eventuali variazioni di pressione esercitate su una nota premuta in precedenza. Questa pressione, unica per tutta la tastiera, è genericamente chiamata After Touch e di solito ad essa viene assegnata una funzione che può modificare alcune caratteristiche del suono (la modulazione, l'intonazione, il volume, ecc.). AFTERTOUCH or CHANNEL PRESSURE – This parameter takes the value of a sensor and transmits any changes in the pressure exerted on a previously pressed note in real time. This pressure, applied to the entire keyboard.

Aftertouch

status: AFTERTOUCH  |  1° data byte: NOTA  |  2° data byte: VALORE AFTERTOUCH

POLYPHONIC AFTERTOUCH o POLYPHONIC KEY PRESSURE – è simile al precedente ma si riferisce all'utilizzo di sensori di pressione indipendenti per ciascuna nota. Il primo data è riferito alla nota e il secondo al valore di after touch. POLYPHONIC AFTERTOUCH or POLYPHONIC KEY PRESSURE – It is similar to the Aftertouch but refers to independent pressure sensors for each note.

Polyphonic Aftertouch

status: PROGRAM CHANGE  |  1° data byte: PRESET NUMBER

PROGRAM CHANGE - viene utilizzato per cambiare scena o preset o timbro da utilizzare nello strumento. Non ha il secondo data byte. PROGRAM CHANGE - We use it to change a preset, or program.

Program Change

status: PITCH BENDER  |  1° data byte: VALORE A (MSB)  |  2° data byte: VALORE B (LSB)

PITCH BENDER – le tastiere sono provviste di slider o joystick con le quali è possibile variare l'altezza di una nota in esecuzione. Occorrono due data byte per definire i valori di incremento o diminuzione dell'altezza (per poter avere 16384 anziché 127 passi). PITCH BEND – MIDI keyboards have sliders, wheels, or joysticks which can be moved to vary the pitch during the sustain of a note.

Pitch Bend

status: CONTROL CHANGE  |  1° data byte: CC NUMBER  |  2° data byte: VALUE

CONTROL CHANGE – questo messaggio permette di trasmettere dei valori di controllo (fino a 128 diversi).
Il primo data indica il numero del controller (CC 0–127) mentre il secondo ne specifica il valore (VALUE 0–127).
CONTROL CHANGE – This message, consisting of two numbers (CC 0–127 and VALUE 0–127), allows control values (up to 128 controllers for each channel) to be transmitted.

Control Change

COMMON MESSAGE

MIDI Time Code Quarter Frame è un messaggio di time code nel formato ore:minuti:secondi:frame, utilizzato per sincronizzare macchine differenti synchronizes multiple streams of audio and video in the format hours:minutes:seconds:frames.
Song Position Pointer , indica la posizione che il cursore deve assumere durante la riproduzione di un file MIDI indicates the playback or cursor's position when playing a MIDI file.
Song Select , consente di selezionare una song all'interno di un sequencer. allows you to select a song within a sequencer.
Tune Request : viene utilizzato per accordare lo strumento. is used to send the tuning value of an instrument.

REAL TIME

MIDI Clock, utilizzato per sincronizzare strumenti MIDI; viene inviato 24 volte per ogni nota del valore di un quarto is used to synchronize the BPM (beats per minute) of multiple connected MIDI instruments.
Start, viene utilizzato per portare tutti gli strumenti esterni alla posizione iniziale della song e a farle partire in riproduzione o registrazione is used to bring all instruments to the same starting position of the song
Stop, utilizzato per fermare la registrazione o la riproduzione degli strumenti collegati al sequencer. stops the recording or playback of instruments connected to the sequencer.
Active Sensing, inviato ogni 300 millisecondi, è utilizzato per tenere attiva la connessione tra master e slave is sent every 300 milliseconds to keep the connection between main and secondary devices active.
System Reset, ripristina le condizioni di default dello slave resets the secondary devices to the default conditions.

EXCLUSIVE MESSAGE

SysEx

System Exclusive (SysEx), sono messaggi che riguardano le funzionalità globali di ogni strumento e sono utilizzati a seconda delle esigenze proprie degli sviluppatori. I codici di sistema esclusivo possono essere interpretati solo da categorie di apparecchi compatibili tra loro. System Exclusive (SysEx) messages control each instrument's global functionality and are used according to the manufacturer's requirements. Since they are specific to a particular device, they can only be interpreted by compatible devices.

nomefile.mid

Un midifile è una sequenza di dati MIDI costituiti da diversi messaggi distribuiti nei vari canali in grado di essere interpretata da qualsiasi strumento reale o virtuale dotato del protocollo MIDI.
Lo standard midifile (SMF) è stato realizzato nel 1986 dalla Opcode System ed ha come estensione .mid.

NON è un file audio!
È un file che contiene dati di nota, durata della nota e intensità della nota di uno o più strumenti.
A MIDI file, .mid, is a file format that contains a sequence of MIDI data, consisting of several messages distributed in various channels, capable of being interpreted by any MIDI compatible hardware device or software instrument.

It's NOT an audio file!

MIDI file

Il General MIDI è stato introdotto nel 1991 per semplificare le operazioni di riproduzione delle sequenze MIDI tramite gli stessi timbri. I timbri sono stati ordinati all'interno una lista i cui numeri sono associati al messaggio di Program Change rispettando sempre la stessa posizione, a prescindere dalla marca dello strumento.

Roland ha creato lo standard GS (General System) che permette di utilizzare un numero superiore di timbri rispetto ai 128 del General MIDI.
Nel 1994 Yamaha introdusse lo standard XG in grado di controllare maggiori banchi e strumenti nonché drum kit ed effetti con la piena compatibilità con il General MIDI.
Some standards, like General MIDI, handle the way instruments are identified, allowing us to quickly assign tracks to various instruments of our choice.

MPE

È una evoluzione del MIDI, o meglio di un modo diverso di usare i messaggi MIDI standard per ottenere maggiori possibilità performative.

Invece di usare i 16 canali in modo separato, accorpa più canali per poter dare a ogni nota più possibilità gestuali.

Per esempio nei controller MPE posso, oltre alla nota e alla sua intensità, mandare il valore di posizione del dito sul tasto, in orizzontale, in verticale e di pressione.
MPE merges multiple MIDI channels to give each note more gestural possibilities, like controlling horizontal and vertical finger position and pressure.

So, with one finger, I can potentially control the note, its intensity, variations of its timbre, and even the amount of reverb I am applying to it.

MPE

Nei collegamenti MIDI con cavi standard a 5 poli esistono 3 tipi di porte MIDI:
La porta MIDI IN, utilizzata per ricevere i messaggi inviati da un'altra macchina
La porta MIDI OUT, impiegata per inviare i messaggi ad altri strumenti
La porta MIDI THRU, consente di reindirizzare un messaggio proveniente alla porta
In MIDI connections with standard 5-pin MIDI cables we can have three type of ports:
MIDI IN, receives MIDI messages from other external devices
MIDI OUT, sends MIDI messages out of the main device
MIDI THRU, passes the MIDI signal from the IN port to the OUT port without applying variations.

MIDI Connessioni

Nell'utilizzo del MIDI in sistemi interamente digitali o comunque in cui il computer sia al centro della catena, posso creare infiniti rapporti di main e secondary. In systems that are comprised of entirely digital devices, the concept of main and secondary devices loses some relevance due to the flexibility offered by digital systems.

MIDI Connessioni digitali

OSC

Open Sound Control

OSC

Open Sound Control

OpenSound Control (OSC) è stato creato dal CNMAT nel 1997 ed è un protocollo "open source" per la comunicazione tra computer, sintetizzatori audio e altri dispositivi multimediali attraverso una rete wireless, cablata o attraverso internet... OpenSound Control (OSC), created by CNMAT in 1997, is an open-source protocol for communication between computers, audio synthesizers, and other multimedia devices over a network.

OSC

OSC

Open Sound Control

OSC

Open Sound Control

OSC ha un'architettura client/server e i dati sono trasmessi in unità denominate pacchetti.
Tutto ciò che manda messaggi OSC è un client.
Tutto ciò che riceve messaggi OSC è un server.
OSC-type messages can be passed back and forth using the classic network architecture type: client/server.
Typically clients send messages to the server and servers receive and execute OSC messages.

OSC client server IP

OSC

Open Sound Control

I messaggi OSC sono formati da 3 parti: OSC messages are composed of three parts:

address pattern è una stringa che specifica l'indirizzo relativo al dato che sto trasmettendois a string that specifies the address relative to the data that is transmitted

per esempio: /ondaquadra/parziale/unoexample: /squarewave/parzial/one

type tag string specifica il tipo di dati di ogni argomentospecifies the data type of each argument

per esempio: floatexample: float (number with a decimal place)

arguments sono i dati contenuti nel messaggioare the parameter values contained in the message

per esempio: 440.5example: 440.5

OSC

Open Sound Control

Client e server devono essere impostati con una porta di uscita e una di entrata.

Inoltre per poter comunicare tra loro i client devono indicare gli indirizzi IP (indirizzo univoco di un computer su una rete) dei server per poter identificare verso chi indirizzare i propri pacchetti.
For clients to send OSC messages, they need to set the destination/server IP addresses.

Both clients and servers should also be configured with a send and a receive port.

OSC client server

OSC

Open Sound Control

OSC app

Ci sono molte applicazioni per smartphone e tablet che usano OSC che permettono per esempio di creare la propria interfaccia di controllo scegliendo dove posizionare gli slider, i knob, i pulsanti… Queste applicazioni permettono anche di trasmettere parametri quali accelerazione e rotazione del dispositivo. OSC is popular on smartphones and tablets, transmitting data via Wi-Fi. OSC-compatible apps let users create custom control interfaces with sliders, knobs, and buttons. These apps can also transmit OSC parameters based on the acceleration and rotation sensors within smartphones or tablets for live electronics performance.

OSC

Open Sound Control

OSC

OSC permette di scambiare un maggior numero di dati in confronto al MIDI, dando inoltre maggiore flessibilità al tipo di dati a disposizione. OSC communicates data quickly over networks and has higher resolution than MIDI, using 32-bit processing for more flexibility. However, it is less ubiquitous than MIDI and requires specifying the address and port for device connections.

Suono Elettronico — Tommaso Rosati

Il libro è ora disponibile The book is now available

ACQUISTA IL LIBRO GET THE BOOK
TommasoRosati