Giter Club home page Giter Club logo

Comments (11)

melanchall avatar melanchall commented on July 19, 2024

Hi,

You just need to use is operator of C# :)

if (args.Event is ControlChangeEvent)
{
    // ... do something ...
}

You can find the list of all event classes in the library Wiki in Events article.

from drywetmidi.

melanchall avatar melanchall commented on July 19, 2024

@eriveraa Is your problem solved?

from drywetmidi.

eriveraa avatar eriveraa commented on July 19, 2024

Hi Melanchall, in fact it works but i was expecting something like a simple property to check (if args.Event.TypeOfMidiEvent == "NoteEvent").
Making a type comparison or type check is time-expensive.

from drywetmidi.

eriveraa avatar eriveraa commented on July 19, 2024

Nice to know!!!, any possible estimated date?

from drywetmidi.

melanchall avatar melanchall commented on July 19, 2024

Hi,

Got it. Well, I think I'll add such property in the next release of the library. Thanks for your feature request.

from drywetmidi.

melanchall avatar melanchall commented on July 19, 2024

I don't plan to make release for now. But I'll add the property on this or next week. So you can just download sources and build the new version for you.

from drywetmidi.

eriveraa avatar eriveraa commented on July 19, 2024

Ok, thanks. Please let me know, so i can download the update.

from drywetmidi.

melanchall avatar melanchall commented on July 19, 2024

Hi @eriveraa,

I've added EventType property to MidiEvent which returns MidiEventType enum value. Please take latest sources and build the library for your project. I'll write to this issue when new version of the library will be released so you can install it via NuGet.

Please let me know if you problem solved or not with this update.

from drywetmidi.

eriveraa avatar eriveraa commented on July 19, 2024

I will try it, thanks!

from drywetmidi.

melanchall avatar melanchall commented on July 19, 2024

@eriveraa, can this issue be closed?

from drywetmidi.

melanchall avatar melanchall commented on July 19, 2024

@eriveraa I'm closing the issue. If you have new questions regarding this issue, reopen it.

from drywetmidi.

Related Issues (20)

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.