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)
- 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
- MidiClock sync problem HOT 6
- MIDI Tempo changes count returns 1 but the song has 6 tempo changes. HOT 1
- add il2cpp mode HOT 5
- CustomChunk no mididata throw error HOT 4
- CSharp Code Error HOT 2
- MIDI File returns error: InvalidMetaEventParameterValueException HOT 1
- Unable to send Note-On event to device HOT 8
- Cannot get track name to change HOT 10
- How to use DryWetMidi in Visual Basic (VS 2022) ? HOT 20
- Plans for MIDI 2.0 Support? HOT 2
- Skipping notes HOT 5
- Playback Loop=True skips empty steps in the end of a Pattern HOT 2
- Syncing multiple Playbacks HOT 7
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.