On my computer this seemed to work. (import 'javax.sound.midi.Synthesizer)
(seq (.getChannels (MidiSystem/getSynthesizer))) (#<MixerMidiChannel com.sun.media.sound.MixerMidiChannel@1b793ee> #<MixerMidiChannel com.sun.media.sound.MixerMidiChannel@15109cf> #<MixerMidiChannel com.sun.media.sound.MixerMid\ iChannel@15b0933> #<MixerMidiChannel com.sun.media.sound.MixerMidiChannel@1b910b0> #<MixerMidiChannel com.sun.media.sound.MixerMidiChannel@f696c6> #<MixerMidiChannel com.sun.medi\ a.sound.MixerMidiChannel@124a4bc> #<MixerMidiChannel com.sun.media.sound.MixerMidiChannel@bb46b7> #<MixerMidiChannel com.sun.media.sound.MixerMidiChannel@11fc4dd> #<MixerMidiChan\ nel com.sun.media.sound.MixerMidiChannel@b59a28> #<MixerMidiChannel com.sun.media.sound.MixerMidiChannel@9bcf06> #<MixerMidiChannel com.sun.media.sound.MixerMidiChannel@134b721> \ #<MixerMidiChannel com.sun.media.sound.MixerMidiChannel@1e2e788> #<MixerMidiChannel com.sun.media.sound.MixerMidiChannel@1ceb175> #<MixerMidiChannel com.sun.media.sound.MixerMidi\ Channel@e4b7d3> #<MixerMidiChannel com.sun.media.sound.MixerMidiChannel@1e09de7> #<MixerMidiChannel com.sun.media.sound.MixerMidiChannel@19eb5f6>) Maybe that's helpful :P I hope. good luck, --Robert McIntyre On Fri, Jan 28, 2011 at 11:59 AM, Ken Wesson <kwess...@gmail.com> wrote: > On Fri, Jan 28, 2011 at 11:30 AM, WoodHacker <ramsa...@comcast.net> wrote: >> Hi, >> >> I'm trying to get the midi sound class in Java to work in Clojure. >> Everything seems to work fine except for the conversion of the >> following Java code: >> >> MidiChannel[] channels = synthesizer.getChannels; >> >> I've tried just dumping the channels into a Clojure object - >> (let [channels (.getChannels @synthesizer)] >> but I get the following error: >> >> Exception in thread "main" java.lang.IllegalArgumentException: Can't >> call public method of non-public class: public >> javax.sound.midi.MidiChannel[] >> com.sun.media.sound.AbstractPlayer.getChannels() > > I don't think this is an array issue at all, but one to do with > overload resolution and Clojure's use of reflection. > > Try hinting @synthesizer like this: > > (let [channels (.getChannels ^Synthesizer @synthesizer)] ...) > > and see if that makes it work. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en