File size: 845 Bytes
b0bfea8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## This is the sequencer's folder.

The code here is responsible for playing back the parsed MIDI sequence with the synthesizer.

### Message protocol:

#### Message structure

```js
const message = {
    messageType: number, // WorkletSequencerMessageType
    messageData: any     // any
}
```

#### To worklet

Sequencer uses `Synthetizer`'s `post` method to post a message with `messageData` set to
`workletMessageType.sequencerSpecific`.
The `messageData` is set to the sequencer's message.

#### From worklet

`WorkletSequencer` uses `SpessaSynthProcessor`'s post to send a message with `messageData` set to
`returnMessageType.sequencerSpecific`.
The `messageData` is set to the sequencer's return message.

### Process tick

`processTick` is called every time the `process` method is called via `SpessaSynthProcessor.processTickCallback`.