wolfsoul13 Posted April 23, 2006 Posted April 23, 2006 I'd like to use javax.sound.midi.* to generate MIDI (at a specific channel, instrument and frequency), something like this: public static void PlayNote(int channel, int note, int instrum) { try { Synthesizer synth = MidiSystem.getSynthesizer(); synth.open(); final MidiChannel[] mc = synth.getChannels(); Instrument[] instr = synth.getDefaultSoundbank().getInstruments(); synth.loadInstrument(instr[instrum]); try { Thread.sleep(100); } catch (InterruptedException e) {} mc[channel].noteOn(note,200); } } catch (MidiUnavailableException e) {} } } I'd like to be able to call this from a C# project. Can I do that? Quote
Cags Posted April 23, 2006 Posted April 23, 2006 It seems unlikely that you will be able to call Java code from code based on the .Net Framework. As Java is not a low level language it requires J2EE (or one of the alternative runtime environments), as such it seems unlikely that it will be cross compatible with another language that also requires it's own runtime environment (.Net Framework). I'm no expert, thats just my 2p on the subject. Quote Anybody looking for a graduate programmer (Midlands, England)?
Leaders snarfblam Posted April 23, 2006 Leaders Posted April 23, 2006 You would probably have better like finding a DLL/ActiveX/.Net based MIDI library that you could use from C#. Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.