Uses MIDI for exchanging messages with the Roland INTEGRA-7 sound module.
- Abstracts from the MIDI-implementation used (only
javax.sound.midi
is implemented for now) - Covers all of the document INTEGRA-7 MIDI Implementation (almost for now)
- Supports multiple INTEGRA-7 at the same time
- May access random addresses without dumping everything (see example below)
- In theory, it's extensible to also support other devices than the INTEGRA-7
- The library is in very early stages. The API is sure to change!
- SysEx implementation is read-only for now (shouldn't be to hard to make read-write, though)
- Support for un-documented SysEx-commands (as found by Wonderer here)
- Additional facade covering the INTEGRA-7 Parameter Guide
- Especially find a way of better abstracting from signed values as some range
-63..63
and some-64..63
- Especially find a way of better abstracting from signed values as some range
See ExampleMain.kt for working examples.
Uses the Java-internal midi-libraries for searching for an INTEGRA-7.
When using this interface, there's not a lot to hold on to, but the OS-supplied device name. Another option would be to send SysEx-identity requests to each device discovered.
val integra7 = MBJavaMidiDiscovery().scan()
.filterIsInstance<MBJavaMidiEndpoint.MBJavaMidiReadWriteEndpoint>()
.first { it.name.contains("INTEGRA7") }
SysEx-requests return regular a Java Future<>
for resolving the response.
It is possible to fetch entire structures as well as single fields. The corresponding names of the request-builders and the returned structures line up.
integra7.withConnection { connection ->
val con = RolandIntegra7(connection)
// slow access (fetches the entire studio-set)
println("Studio set name: " + con.request { it.studioSet }.get().common.name)
// fast access (fetches only the name)
println("Studio set name: " + con.request { it.studioSet.common.name }.get())
}
Will use CC and PC messages to load a sound. Then read the name of the loaded sound via SysEx.
integra7.withConnection { connection ->
val con = RolandIntegra7(connection)
// Load SN-A "Pure ClavCA1" on channel 5
con.send(BankSelectMsb(MidiChannel.CHANNEL_5, 89))
con.send(BankSelectLsb(MidiChannel.CHANNEL_5, 64))
con.send(ProgramChange(MidiChannel.CHANNEL_5, 35))
// Assume part == channel
println( "Expecting 'Pure ClavCA1' == " + con.part(IntegraPart.P5).sound.tone.tone.common.name)
}
RPN-Messages may be sent like normal MIDI-messages even though they result in multiple actual messages:
integra7.withConnection { connection ->
val con = RolandIntegra7(connection)
con.send(RolandIntegra7RpnMessage.PitchBendSensitivity(MidiChannel.CHANNEL_1, semitones = 4))
}
- JDK 8 or higher
- Kotlin stdlib 1.4.10