Sammy1Am / Moppy2

The evolution of the Musical flOPPY controller
Other
314 stars 52 forks source link

ControlGUI #76

Closed JE521 closed 4 years ago

JE521 commented 5 years ago

Hi, I know moppy is really old, but i was interested. I am on pc. I followed the directions on the wiki, but when I am supposed to open the "MoppyControlGUI.bat", (I was given the prompt to agree to run it) , it opens for a millisecond and then closes. The Hardware and arduino set up worked fine, and i am using moppy 2.0.1. If you could help that would be much appreciated. Thank you

Sammy1Am commented 5 years ago

Replying by email so excuse the brevity (I can try more later if this doesn't help):

Instead of double clicking the .bat, try opening the command line (Start>run>cmd) and running the bat from there. It'll show any errors that occur hopefully.

Also look around in the Moppy folders for log files that might have errors.

Maybe try before unzipping, right clicking, properties, and check "unblock", then unzip.

If it's still not working, or there's an error, let me know and I'll respond at length later.

Good luck!

On Wed, Aug 21, 2019, 13:24 JE521 notifications@github.com wrote:

Hi, I know moppy is really old, but i was interested. I am on pc. I followed the directions on the wiki, but when I am supposed to open the "MoppyControlGUI.bat", (I was given the prompt to agree to run it) , it opens for a millisecond and then closes. The Hardware and arduino set up worked fine, and i am using moppy 2.0.1. If you could help that would be much appreciated. Thank you

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SammyIAm/Moppy2/issues/76?email_source=notifications&email_token=AADSF6DU2XBPLXWU24RM3H3QFWP7ZA5CNFSM4ION2WLKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HGTVK4A, or mute the thread https://github.com/notifications/unsubscribe-auth/AADSF6CYTKNPXYBAV4JTLM3QFWP7ZANCNFSM4ION2WLA .

JE521 commented 5 years ago

Thank you for responding. I copied the text contents of the .bat file and pasted it in command prompt. I hop thats what you meant. but it did the same thing. I also unblocked it. when i clicked on it, it would pull up a window and had the options "extract all", "Run", and "Cancel". I clicked run, did the same thing. I extracted all and it just made another duplicate moppycontrolGUI folder.

I also noticed in the wiki, it has no mention of netbeans, is netbeans not required anymore?

Sammy1Am commented 5 years ago

Alrighty, back home and in front of a computer now.

It sounds a bit like it's probably a Java-related issue, but it's hard to say for certain what it is without a little more info. There's some things to try below that will hopefully give you a more specific error message so you can figure out what's wrong, but you may also want to try reinstalling Java, or installing a different version of Java. Also confirm that Java is in your user's PATH.

When you say "it opens for a millisecond and then closes", are you actually seeing a Java UI (gray/white window) show up for a second, or are you just seeing a command prompt (black window) show up?

Instead of copy-pasting the .bat file, try this:

  1. Go to the folder where the .bat file is.
  2. In the location/address bar at the top (the bit that says, C:\Users\You\Downloads or whatever), type cmd. This should open up a command prompt already in that directory.
  3. Type MoppyControlGUI.bat and hit enter.

What happens? Are there any errors shown in the command terminal? And did you have any luck finding any .log files in the Moppy folders after attempting to launch the GUI?

NetBeans is no longer required just to run Moppy. You can still use it to modify and build your own copy of the source code, but if you're just looking to use it as-is it's not required.

JE521 commented 5 years ago

an error message shows up when i run it via terminal, it is: "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the location of your Java installation." And I could not find any .log files.

When the window opens for a millisecond and closes, it opens on the terminal.

Also i do not know what you mean by confirming java is in my user's path. I have JDK version 12.0.2, and i have a java folder on my program files folder. i also have a folder named file folders (x86) which does not have java in it. I can confirm java works because minecraft java works on my pc.

thanks again for helping me

Sammy1Am commented 5 years ago

I'll refer to you to Google for setting JAVA_HOME in your particular environment since it varies a bit sometimes. Just get JAVA_HOME set correctly and you should hopefully be good to go.

JE521 commented 5 years ago

Thank you it works. but i have one more question? Is it possible to run moppy with a 3 1/4" floppy drive and a 5 1/2" floppy drive. I am using a 3 1/4" floppy. Also how would I go about adding more floppies? thank you so much for your help.

JE521 commented 5 years ago

I meant 5 1/4" floppy drive

Sammy1Am commented 5 years ago

Yup, 5.25" drives work just fine (though some of them may have less tracks, so you'll need to adjust the maximum position for those drives in the Arduino code (to 79 instead of 158)).

You can add up to 9 floppies by just connecting them to the next available pair of pins (e.g. 2&3, 4&5, &c.).

JE521 commented 5 years ago

Do you have a pinout diagram by chance? I can't seem to find it in its manual.

Sammy1Am commented 5 years ago

5.25" drives, I believe, have the same pin ordering as the 3.5" drives, just a different connector type.

JE521 commented 5 years ago

I am working on the connections, but how do I change the max position for any of the drives. I checked the code and couldn't find any variable for the max position. Also is it ok to connect all of the drive's ground pins to the same ground pin on the arduino. I doubt it but I don't see much different ground pins on the arduino.

JE521 commented 5 years ago

the drive does not work, is it possible to control the stepper by directly connecting it to the arduino. I looked online and in your previous issues but can not find anything. Thanks again so much for your guidance.

JE521 commented 5 years ago

I also can not seem to run the working floppy on any of the other pins for additional drives, i was checking to see if it worked and it didn't.

Sammy1Am commented 5 years ago

GitHub has a useful search function to find things in a repository.

It's not possible to control the stepper motor directly from the Arduino (there is some circuitry required to drive stepper motors, but it's conveniently included in the floppy drive hardware which is why floppy drives work so well). It is possible to drive stepper motors directly using Moppy, but you'd need a driver board connected to the Arduino to do so.

Make sure the MIDI file you're using has enough tracks for the other pins to have things happening on them, and make sure your mapping settings in the GUI are sending events for all the MIDI channels.

DarianKimberly commented 5 years ago

Is there a linux version or will I need to completely rewrite the code in a compatible format?

Sammy1Am commented 5 years ago

@DarianKimberly , Moppy's written in Java so you're good to go pretty much anywhere. In the bin directory there's a file named MoppyControlGUI that should (I haven't actually tested) allow you to easily run the ControlGUI. If that script doesn't work out of the box, it should only require minor adjustments, or you should be able to run MoppyControlGUI-2.0.1.jar directly as long as you set the classpath correctly.

DarianKimberly commented 5 years ago

Not sure how to set the classpath. New to this.

On Sun, Sep 8, 2019, 1:48 PM SammyIAm notifications@github.com wrote:

@DarianKimberly https://github.com/DarianKimberly , Moppy's written in Java so you're good to go pretty much anywhere. In the bin directory there's a file named MoppyControlGUI that should (I haven't actually tested) allow you to easily run the ControlGUI. If that script doesn't work out of the box, it should only require minor adjustments, or you should be able to run MoppyControlGUI-2.0.1.jar directly as long as you set the classpath correctly.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SammyIAm/Moppy2/issues/76?email_source=notifications&email_token=ANECLXD4CRSQFYV3TLQSPJDQIVCJHA5CNFSM4ION2WLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FW2AQ#issuecomment-529231106, or mute the thread https://github.com/notifications/unsubscribe-auth/ANECLXFG7IDQNVUJLOLCGADQIVCJHANCNFSM4ION2WLA .

Sammy1Am commented 5 years ago

Did the script not work? What error are you seeing when you run it?

I'm happy to try to help answer specific questions; but because there are a ton of different variables to a given setup and Moppy generally just uses pretty standard libraries, you'll probably have just as much (or better) luck on Google for a lot of the generic getting-Java-working-on-my-system questions.

DarianKimberly commented 5 years ago

Just trying to figure out if I can control my arduino from my Raspbian setup as it is linux based. Not sure if it is compatible. the controller program is a windows batch file, and im not sure how to convert it into something linux friendly.

On Sun, Sep 8, 2019, 2:02 PM SammyIAm notifications@github.com wrote:

Did the script not work? What error are you seeing when you run it?

I'm happy to try to help answer specific questions; but because there are a ton of different variables to a given setup and Moppy generally just uses pretty standard libraries, you'll probably have just as much (or better) luck on Google for a lot of the generic getting-Java-working-on-my-system questions.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SammyIAm/Moppy2/issues/76?email_source=notifications&email_token=ANECLXAPVJ2LTIVIO6EX2T3QIVD23A5CNFSM4ION2WLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FXBCA#issuecomment-529232008, or mute the thread https://github.com/notifications/unsubscribe-auth/ANECLXC5FVIZQPS6AP74U6TQIVD23ANCNFSM4ION2WLA .

DarianKimberly commented 5 years ago

The reason behind this is that I want to make a portable version of the moppy built that i can control wirelessly through a raspberry pi zero w connected to my uno and VNC viewer.

On Sun, Sep 8, 2019, 2:15 PM Darian Kimberly darianthetiger@gmail.com wrote:

Just trying to figure out if I can control my arduino from my Raspbian setup as it is linux based. Not sure if it is compatible. the controller program is a windows batch file, and im not sure how to convert it into something linux friendly.

On Sun, Sep 8, 2019, 2:02 PM SammyIAm notifications@github.com wrote:

Did the script not work? What error are you seeing when you run it?

I'm happy to try to help answer specific questions; but because there are a ton of different variables to a given setup and Moppy generally just uses pretty standard libraries, you'll probably have just as much (or better) luck on Google for a lot of the generic getting-Java-working-on-my-system questions.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SammyIAm/Moppy2/issues/76?email_source=notifications&email_token=ANECLXAPVJ2LTIVIO6EX2T3QIVD23A5CNFSM4ION2WLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FXBCA#issuecomment-529232008, or mute the thread https://github.com/notifications/unsubscribe-auth/ANECLXC5FVIZQPS6AP74U6TQIVD23ANCNFSM4ION2WLA .

Sammy1Am commented 5 years ago

So, just to clarify again, the controller program is a .jar file. There is a Windows .bat file included for running on Windows machines, and a shell script (the file I mentioned before in the bin directory) for running on Linux/Unix.

Try the shell script.

Edit: The setup you describe should work just fine, I'm fairly sure I've talked to others who setup Moppy similarly and it works great.

DarianKimberly commented 5 years ago

I tried and it just opens as a text file

On Sun, Sep 8, 2019, 2:25 PM SammyIAm notifications@github.com wrote:

So, just to clarify again, the controller program is a .jar file. There is a Windows .bat file included for running on Windows machines, and a shell script (the file I mentioned before in the bin directory) for running on Linux/Unix.

Try the shell script.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SammyIAm/Moppy2/issues/76?email_source=notifications&email_token=ANECLXFTPGI6YDKM77J4UXDQIVGUJA5CNFSM4ION2WLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FXP7A#issuecomment-529233916, or mute the thread https://github.com/notifications/unsubscribe-auth/ANECLXHYNWI4PDLNIGB6D5DQIVGUJANCNFSM4ION2WLA .

DarianKimberly commented 5 years ago

Update. I manually set it to executable (for some reason this is not a default), and it opens for a brief moment, then just closes.

On Sun, Sep 8, 2019, 2:27 PM Darian Kimberly darianthetiger@gmail.com wrote:

I tried and it just opens as a text file

On Sun, Sep 8, 2019, 2:25 PM SammyIAm notifications@github.com wrote:

So, just to clarify again, the controller program is a .jar file. There is a Windows .bat file included for running on Windows machines, and a shell script (the file I mentioned before in the bin directory) for running on Linux/Unix.

Try the shell script.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SammyIAm/Moppy2/issues/76?email_source=notifications&email_token=ANECLXFTPGI6YDKM77J4UXDQIVGUJA5CNFSM4ION2WLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FXP7A#issuecomment-529233916, or mute the thread https://github.com/notifications/unsubscribe-auth/ANECLXHYNWI4PDLNIGB6D5DQIVGUJANCNFSM4ION2WLA .

Sammy1Am commented 5 years ago

Try executing it from a terminal. It should output any errors in encounters (you can also look for *.log files in the Moppy directories).

If I had to guess though, it's probably a JAVA_HOME environment variable issue. Make sure that's set up correctly. (But try running from a terminal to look for the error first, it might be something else)

Edit: Actually, if you just scroll up on this page and read the thread you replied to, you can see that @JE521 had a similar issue and resolved it.

DarianKimberly commented 5 years ago

Again, no dice. I already tried executing it from the terminal.

On Sun, Sep 8, 2019, 2:51 PM SammyIAm notifications@github.com wrote:

Try executing it from a terminal. It should output any errors in encounters (you can also look for *.log files in the Moppy directories).

If I had to guess though, it's probably a JAVA_HOME environment variable issue. Make sure that's set up correctly. (But try running from a terminal to look for the error first, it might be something else)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SammyIAm/Moppy2/issues/76?email_source=notifications&email_token=ANECLXBL6R2RNUNFQJ3HO3TQIVJU3A5CNFSM4ION2WLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FX6HQ#issuecomment-529235742, or mute the thread https://github.com/notifications/unsubscribe-auth/ANECLXFFZSHG6XXMD52LW23QIVJU3ANCNFSM4ION2WLA .

Sammy1Am commented 5 years ago

What was the output when you tried to run it? (I can't help if I don't know what issues you're running into)

DarianKimberly commented 5 years ago

Executing in terminal results in a terminal that opens for a split second and immediately closes. Nothing else happens.

On Sun, Sep 8, 2019, 2:53 PM SammyIAm notifications@github.com wrote:

What was the output when you tried to run it? (I can't help if I don't know what issues you're running into)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SammyIAm/Moppy2/issues/76?email_source=notifications&email_token=ANECLXCBL7WMRFHDT4TSDILQIVJ2RA5CNFSM4ION2WLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FX65A#issuecomment-529235828, or mute the thread https://github.com/notifications/unsubscribe-auth/ANECLXHZTSACEIGENVWV63LQIVJ2RANCNFSM4ION2WLA .

JE521 commented 5 years ago

you could try the JAVA_HOME thing, just scroll up to beginning.

JE521 commented 5 years ago

I think that the pin problem might be due to my use of an arduino mega 2560 instead of an uno. I will try to purchase an uno if there is no way to do this with my board. Also I will be less active on github because of school.

DarianKimberly commented 5 years ago

What do you mean by that?

On Mon, Sep 9, 2019, 1:56 PM JE521 notifications@github.com wrote:

I think that the pin problem might be due to my use of an arduino mega 2560 instead of an uno. I will try to purchase an uno if there is no way to do this with my board. Also I will be less active on github because of school.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SammyIAm/Moppy2/issues/76?email_source=notifications&email_token=ANECLXHTPF7UISHKK5MY6SDQI2L7RA5CNFSM4ION2WLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6IVMPQ#issuecomment-529618494, or mute the thread https://github.com/notifications/unsubscribe-auth/ANECLXHZ2EI7WSLA7Z3TUCDQI2L7RANCNFSM4ION2WLA .

Sammy1Am commented 5 years ago

@JE521 , The Arduino Mega should work fine for the first set of pins (roughly 2-19 or so). Can you maybe send a screenshot of your ControlGUI, just in case something with the mappers is preventing channels higher than 1 from being sent to the drives?

No rush of course, enjoy (?) school. ;P

Sammy1Am commented 5 years ago

@DarianKimberly . JE521 is referring to the original topic of this issue which he created.

Generally it's best to create a new issue if you're asking for help with an unrelated problem.

DarianKimberly commented 5 years ago

The problem is getting the GUI program to open. It just opens a command line for an instant, then immediately closes.

On Mon, Sep 9, 2019, 3:28 PM SammyIAm notifications@github.com wrote:

@DarianKimberly https://github.com/DarianKimberly . JE521 is referring to the original topic of this issue which he created.

Generally it's best to create a new issue if you're asking for help with an unrelated problem.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SammyIAm/Moppy2/issues/76?email_source=notifications&email_token=ANECLXDO4WGWPA4OGH6TZRTQI2WVHA5CNFSM4ION2WLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6I5S5A#issuecomment-529652084, or mute the thread https://github.com/notifications/unsubscribe-auth/ANECLXDJDS5YDKMUVOGSIOTQI2WVHANCNFSM4ION2WLA .

Sammy1Am commented 5 years ago

@DarianKimberly : I was talking to JE521, not you. Why don't you open up a new issue and we'll see if we can't get you sorted out over there.

DarianKimberly commented 5 years ago

Sorry. My bad. It emails me with every reply.

On Mon, Sep 9, 2019, 3:35 PM SammyIAm notifications@github.com wrote:

@DarianKimberly https://github.com/DarianKimberly : I was talking to JE521, not you. Why don't you open up a new issue and we'll see if we can't get you sorted out over there.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SammyIAm/Moppy2/issues/76?email_source=notifications&email_token=ANECLXF6VDXP3VPVGV6BUK3QI2XQJA5CNFSM4ION2WLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6I6JWY#issuecomment-529655003, or mute the thread https://github.com/notifications/unsubscribe-auth/ANECLXBFIYYXYKVOUFLKRBTQI2XQJANCNFSM4ION2WLA .

JE521 commented 5 years ago

Moppy Control 9_13_2019 5_19_27 PM

JE521 commented 5 years ago

Also I have a driver board for my stepper.

Sammy1Am commented 5 years ago

Alright, so... this might seem like a silly suggestion, but I figure we should just make sure... The MIDI file you have open is called KirbysTheme (1 floppy).mid which I assume has been written for just one floppy drive (and therefore probably doesn't contain any notes for any of the other drives). Maybe try a different file?

As something to try though, you can click "Add Mapper" and set up the mappers like this:

n>22 && n<67 1 1 n
n>22 && n<67 1 2 n

That will basically take any note that comes in and assign it to SubAddress 1 (first row) and SubAddress 2 (second row). That'll make the first two floppy drives play the same notes, but could help testing your second drive.

Regarding the stepper motor, as long as the board is sufficiently similar to the L298N board, you should be able to comment out the two FloppyDrives lines in MoppyCore.cpp and uncomment the L298N lines. The L298N code was contributed by someone else so I don't know the nitty gritty, but if it doesn't work out of the box it should work with some small modifications.

JE521 commented 5 years ago

That sounds like a good idea, but the 4,5 pins and so on don't work, I try restarting arduino on those pins and floppy wont play startup sound. Also the subaddress says play for 1 floppy because I set that when I saw the issue you forwarded me.

JE521 commented 5 years ago

Also the 5.5" floppy doesn't work, so I am trying to tap into its stepper motor. And I am getting more 3.25" floppies soon.

Sammy1Am commented 5 years ago
JE521 commented 5 years ago

I hooked up the right pins to the 2,3 pins on arduino. it wont move.

JE521 commented 4 years ago

I am sorry i cut off this issue without notice, my computer broke and I was busy with school. I don't have the time for this kind of project. Thanks again for your help

DarianKimberly commented 4 years ago

Is fine. Education is important. I quit my job because they asked me if I valued education or my job more.

On Thu, Jan 2, 2020, 10:23 PM JE521 notifications@github.com wrote:

I am sorry i cut off this issue without notice, my computer broke and I was busy with school. I don't have the time for this kind of project. Thanks again for your help

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SammyIAm/Moppy2/issues/76?email_source=notifications&email_token=ANECLXAB62DERUJ62HZPGVDQ324SRA5CNFSM4ION2WLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIAH2JI#issuecomment-570457381, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANECLXFAEDVLU2BZUGGD3LDQ324SRANCNFSM4ION2WLA .

Sammy1Am commented 4 years ago

Closing for now, good luck with school. Feel free to re-open if you try again and have the same issue.