Comments (11)
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.
@eriveraa Is your problem solved?
from drywetmidi.
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.
Nice to know!!!, any possible estimated date?
from drywetmidi.
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.
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.
Ok, thanks. Please let me know, so i can download the update.
from drywetmidi.
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.
I will try it, thanks!
from drywetmidi.
@eriveraa, can this issue be closed?
from drywetmidi.
@eriveraa I'm closing the issue. If you have new questions regarding this issue, reopen it.
from drywetmidi.
Related Issues (20)
- Native64 dll not found on UWP HOT 2
- How do I know when i have added sufficient notes for a bar using the Pattern Builder Class HOT 14
- Getting instrument by channel HOT 2
- Add time offset for each notes during playback? HOT 2
- Generate drumming patterns HOT 10
- Read multiple MIDI files from stream HOT 17
- Issue in demo-scene in unity. HOT 7
- Anytime I retrieve a device from InputDevice.GetByIndex() it returns a new instance of that device. HOT 4
- Failing to Dispose() of an InputDevice results in never being able to use that device again. Until Unity restart. HOT 3
- Connection issues and how to debug them? HOT 5
- Can't sync midi file notes with audio file HOT 12
- HELP !!! Notes in panel to midi file?? HOT 9
- please help a noob HOT 6
- Remove all notes example from the README not working HOT 9
- Using wetdrymidi in C# project causes error CS0009
- InputDevice event listening crash HOT 2
- Crash when running in Unity on M2 MacBook HOT 3
- MidiDeviceException Internal error HOT 9
- Android Support
- Unity cannot exit after use HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drywetmidi.