-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADD MIDI CONTROL OUT EXAMPLE #120
Comments
Which value are you wanting to send? If it is Evan made a midi out tutorial that might be helpful: https://youtu.be/gb1kcqpELeE |
Hey Nick thanks for the quick reply! thank you for your help! Button("Send Controller 5 - 127") { |
|
Thanks Nick! |
Description
Hello,
I saw it was mentioned somewhere in the TODO list :)
I am very new to swift and tried to mix the midi monitor example with some Controls example but I didn't figure out how to connect the ui value to the sendcontrol command .
if anyone has any lead or example, I take it ! ::)
thank you!
here is my code so far:
//
// File.swift
//
//
// Created by Frexka Tet on 12/27/22.
//
import AudioKit
import AudioKitUI
import CoreMIDI
import Foundation
import SwiftUI
import Controls
struct MIDIPortTestViewFreeka: View {
@StateObject var conductor: MIDIPortTestConductor = .init()
@State private var selectedPort1Uid: MIDIUniqueID?
@State private var selectedPort2Uid: MIDIUniqueID?
@State var x: Float = 0.5
@State var y: Float = 0.5
// .resizable()
.scaledToFit()
.edgesIgnoringSafeArea(.all)
// ScrollView {
GeometryReader { proxy in
// print( x )
// print( y )
// Spacer()
// Divider()
HStack {
Picker(selection: $selectedPort1Uid, label:
Text("Destination Ports:")) {
Text("All")
.tag(nil as MIDIUniqueID?)
ForEach(0 ..< conductor.destinationNames.count, id: .self) { index in
//
// Divider()
// HStack {
// Toggle(isOn: $conductor.outputIsOpen) {}
//// Toggle(isOn: $conductor.inputPortIsSwapped) {}
//// Toggle(isOn: $conductor.outputPortIsSwapped) {}
// }
// HStack {
// Text("use midi.openOutputs()")
//// Text("Swap UID for the virtual Input Port")
//// Text("Swap UID for the virtual Output Port")
// }
}
.padding()
}
struct Previews_Midi_Freeka_Previews: PreviewProvider {
static var previews: some View {
/@START_MENU_TOKEN@/Text("Hello, World!")/@END_MENU_TOKEN@/
}
}
Proposed Solution
/
Describe Alternatives You've Considered
/
Additional Context
No response
The text was updated successfully, but these errors were encountered: