Skip to content

How to handle Pitch Bend ? #28

@ghopretz

Description

@ghopretz

Just figured this out.
While the event listener listens for MidiEvents, most of them are also ChannelEvents, which is an detention of MidiEvent. The ChannelEvents have the info you need to load the channels of your synth.

Here is an example in Kotlin, within the onEvent callback.

                var channel = 0
                if(event is ChannelEvent){
                    Log.i("ChannelEvent", "${event.getChannel()}")
                    channel = event.channel
                }
                if (event is ProgramChange){
                    synth.channels[event.channel].programChange(event.programNumber)
                }

The ProgramChange event has the channel number and instrument voice to load your synth.

How to handle Pitch Bend in Event Listener?

Originally posted by @ghopretz in #25 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions