From: J. Mark Brooks <brooksjmark@ya...> - 2003-08-06 22:26:38
Here's the code:
from javax.sound.midi import Synthesizer, MidiSystem
channel = synth.getChannels()
When I enter the above code, it runs fine in interactive mode, but it
does absolutely nothing when I try to run it as a script.
From: Tom Jensen <tom@kr...> - 2003-08-08 16:14:28
It is probably playing the note so quickly that you aren't hearing it. Try putting this
between the noteOn and sys.exit():
You'll obviously need to 'import time' I would actually advise to put a noteOff(60)
after sleeping too before exiting. Are you building a sequencing program?
p.s. for getting the channel you could just do synth.channels and remove the extra
characters that jython is so great for removing from java syntax.
> Here's the code:
> from javax.sound.midi import Synthesizer, MidiSystem
> import sys
> channel = synth.getChannels()
> When I enter the above code, it runs fine in interactive mode, but it
> does absolutely nothing when I try to run it as a script.
> Mark Brooks
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> Jython-dev mailing list