Giter VIP home page Giter VIP logo

gong's People

Contributors

dclelland avatar joebayld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gong's Issues

Sample Project

Hi, i'm interested on moving my app on your library.
Trying your sample but it does not work for me.
Using the same MIDI setup options does work on CoreMIDI...
Any help?
screen shot 2018-07-13 at 19 43 55

No such module

1.) I downloaded the package by git clone https://github.com/dclelland/Gong.git
2.) I go to the example directory and open the project
3.) I select a team in the code signing sections
4.) build however I get error that No such module

There is also an red x where gong package is.

Not sure what to do to get this running
Screen Shot 2022-05-30 at 12 48 28 AM

Using in SPM does not work

When II try to include Gong through XCODE SPM it fails with:

because every version of Gong contains incompatible tools version and root depends on Gong 1.2.0..<2.0.0, version solving failed.

Is there a way to resolve this?
Thanks

Send Control Change MIDI data

Hello, thanks to this library I managed to send note type midi data but I didn't find how to send Controle Change type midi data.

Thanks

Midi channel change

Thank you for this incredible library! I was able to get it working on iOS.

This may be related to the previous question, but is there a way to manually set the channel that the midi data is sent out on? In the example app, it shows as being sent on channel 0. How do I set it to send on different channel?

Thanks again for a wonderful library!

takeRetainedValue of propertyName creates zombie when MIDINetworkSession is connected

I’m aim to add a wrapper for MIDINetworkSession which I intend to use for iPad app, and came across what may be an issue in MIDINotice.

I recreated the example app for iOS and when an external device connects via a MIDI network session two notifications are generated ( .propertyChanged and .setupChanged) this appears to create a zombie CFString. I think this is the result of the first notification ( .propertyChanged ) retaining the noticiation.propertyName.

let property = notification.propertyName.takeRetainedValue()

changing the above to

let property = notification.propertyName.takeUnretainedValue()

fixes the issue, although early days so I haven’t fully tested for side effects.

Steps to recreate:

  1. I replicated the test app for an iOS device
  2. Using MIDI Network Setup on a Mac I connect to the iPad
  3. The the iPad prints the notification for .propertyChanged to the debug console
    iPad app crashes with Thread 1: EXC_BAD_ACCESS (code=1, address=0xa6e472e10)

Using instruments we see.

**Zombie Messaged**

An Objective-C message was sent to a deallocated 'CFString (immutable)' object (zombie) at address: 0x2808304e0. 

Please add option to format packet.message

Can you add a option for message formatting or create a different formate for message

example: MIDIPacket(.noteOn(channel: UInt8(channel), key: UInt8(pitch), velocity: UInt8(velocity)), delay: onset),

currently:

'noteOff(channel: 0, key: 62, velocity: 0)'

it would be nice if we could have a options to get the midi data like this

[type: "noteOff", channel: 0, key: 62, velocity: 0]

Install Probelm

Hello,

I want to send midi notes to virtual midi devices on macOS (10.13.6) such as garageband or vmpk. I assume I could use this library for the purpose (Please let me know if it's not the case) Anyway I tried to install after cloning it and I got this error message:

pod 'Gong', '~> 1.2'
[!] Unknown command: Gong,
Did you mean: init?

The above command was issued in Gong/Sources.
I earlier had to install cocoapods with 'sudo gem install cocoapods'

When went wrong?

How to send MIDI to other apps and network session?

Hi, thanks for the library!

I'm trying to send midi to other apps (by being a virtual source) and also send to network session.
I wrote a MIDIManager class similiar to your MIDI singleton but I couldn't manage to work it.

public class MIDIManager {
  public static let shared = MIDIManager()
  public private(set) var name: String = "MIDIManager"
  public private(set) var client: Gong.MIDIClient?
  public private(set) var output: Gong.MIDIOutput?

  public func openOutput(name: String) {
    self.name = name

    do {
      client = try Gong.MIDIClient(name: "\(name) Client")
      output = try client?.createOutput(name: "\(name) Output")
    } catch {
      return
    }
  }

  public func sendNoteOnMessage(noteNumber: UInt8, velocity: UInt8, channel: UInt8) {
    guard let output = output else { return }
    let packet = MIDIPacket(.noteOn(channel: channel, key: noteNumber, velocity: velocity))
    for destination in MIDIDestination.all {
      destination.send(packet, via: output)
    }
  }

  public func sendNoteOffMessage(noteNumber: UInt8, velocity: UInt8, channel: UInt8) {
    guard let output = output else { return }
    let packet = MIDIPacket(.noteOff(channel: channel, key: noteNumber, velocity: velocity))
    for destination in MIDIDestination.all {
      destination.send(packet, via: output)
    }
  }
}

I'm trying this on an iOS app to send midi notes to Garageband on iOS and Logic on mac over network session.
What am I missing?
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.