how to send bits to the parallel port ???

D

drgonzo120

hello,


a friend of mine wrote a program in qbasic to program a synthesizer, he
writes bytes to the synth thru the parport, can i use commapi for this
or , what is the best way to do this, i only know java as language for
building regular business software (db-apps), must i have a driver ???
it's for w2k, i'm afraid i'll need the JNI ??? java native interface
.... is it possible zith commapi or is that only to write to printers
??? not much info on google


thanks
 
K

Kimmo Tuukkanen

drgonzo120 said:
he writes bytes to the synth thru the parport, can i use commapi for
this or , what is the best way to do this, i only know java as
language for building regular business software (db-apps), must i

Java Communications API should do that, although I'm not sure if the
support for parellel ports is complete. The whole API is quite old and
as far as I know, its practically discontinued by Sun. Anyway, by using
the API and streams you should be able to write bytes to a port.

http://java.sun.com/products/javacomm/

Go to Documentation -> Users Guide -> SimpleWrite.java for a simple
example of how it is done with serial ports.

At least it works fine with a GPS-receiver connected to a serial port.
 
R

Roedy Green

a friend of mine wrote a program in qbasic to program a synthesizer, he
writes bytes to the synth thru the parport, can i use commapi for this
or , what is the best way to do this, i only know java as language for
building regular business software (db-apps), must i have a driver ???
it's for w2k, i'm afraid i'll need the JNI ??? java native interface
... is it possible zith commapi or is that only to write to printers
??? not much info on google

See http://mindprod.com/jgloss/parallelport.html
for your options. To get at the bidi features he will likely need
some custom JNI.
 
J

jan V

Andrew said:
I think it was last shipped with Win98SE. Maybe with ME too?

And rather handy if you want to give a total non-programmer a taste of what
programming is all about.... Java ain't suited for that.
 
J

jan V

..to program a synthesizer, ..
A Moog? Theremin? Or something more based on MIDI coms?

This is the key question. If it's MIDI, then there's a whole universe of
MIDI support awaiting the OP in J2SE !!
 
A

Andrew Thompson

This is the key question. If it's MIDI, then there's a whole universe of
MIDI support awaiting the OP in J2SE !!

I'm kinda' hopin' it it the Theremin, actually..
(..only because it's more exotic and interesting).

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"The Generals gave thanks, as the other ranks held back the enemy tanks
...for a while."
Pink Floyd 'When The Tigers Broke Free'
 
D

drgonzo120

hello,


thanks for answering guys, its the synth that revolutionised dance
music: it is a tb-303, he put a connector between its cpu and its
memory, now you can program it thru a pc, he still has to say how
though, he wrote the stuff in qbasic and I have to write it in java
with a better GUI, so i dont know the tb-303 has a midi, i dont think
so , i guess....

so how should i do it now ??? all i need are a few concrete steps so i
can get this off the ground, i will research it then, but i have to
know what ...


thanks

quote::
The typical way of controlling a non standard device through the
parallel port is to merrily ignore the control lines for the most part,
or use them in some bizarre way, and pump data through the output
lines. Input is done by absconding with the control in lines, and use
them in ways Centronics never imagined, e.g. to read nifty stuff like
whether the dragon is fully submerged.

Presumably the sun engineer implemented javax.comm by reading the
Centronics printer spec. Too bad, he/she missed the point of why you
need a javax.comm interface. You will have to roll your own with JNI.

If you are tinkering with a home brew interface, tie the parallel port
status lines 10 and 11 (Ack and Busy) to low/ground and lines 12, 13
and 15 (paper out, select, and error) to high/5V. The javax.com
software will not work without properly simulated status signals.

end quote


so am i fucked ???
 
D

drgonzo120

hello,


so what language should i use then ???


should i use a driver with java ??? a dll file ??? should i use c++ ...
? let's presume its for w2k/xp

thanks
 
A

Andrew Thompson

so what language should i use then ???

I don't think jan was making any comment specifically
on this thread, but I could be wrong..
should i use a driver with java ??? a dll file ??? should i use c++ ...
? let's presume its for w2k/xp

If the TB-303 understands MIDI, I suggest..
- stop messing (directly) with parallel port.
- install a MIDI port (hardware, might be connected to parallel).
- use Java MIDI* to send signals to the TB-303 (or other
MIDI device/s) via the MIDI interface.
- jam.

*
<http://java.sun.com/j2se/1.5.0/docs/api/javax/sound/midi/package-summary.html>

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"The storm broke with a violent flash of lightning, and an apalling crash
of thunder.."
Severed Heads 'Dead Eyes Opened'
 
J

jan V

thanks for answering guys, its the synth that revolutionised dance
music: it is a tb-303, he put a connector between its cpu and its
memory, now you can program it thru a pc, he still has to say how
though, he wrote the stuff in qbasic and I have to write it in java
with a better GUI, so i dont know the tb-303 has a midi, i dont think
so , i guess....

Congratulate your friend on the hardware hack, but why bother? Roland's
classic drum and base synths have been emulated in absolutely mindblowing
products like Propellerhead's Rebirth.

Is your friend aiming for stage "cool" effect by actually having a physical
TB-303 on show? Is that the point of the whole exercise?
so how should i do it now ???

If you haven't seen Rebirth in action, I'd arrange for a demo of this
software first, then you won't want to help your friend anymore ;-)
 
D

drgonzo120

hello,


anyway, it is not midi controlled, I need to write words to a ports
(mem address) i need to use the status, control and data lines of the
parport ... so each bit has to be written in the bitword, as far as i
know now ...


any geniouses out there ???


thanks dudes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top