Results 1 to 6 of 6
Thread: Need help with
- 09-14-2008, 06:26 PM #1
Need help with
I'm a musician and would like to create a drumming software using swing.
its should have the basic feature of looping, playing more than one tool(eg hi-hat & bass drum ).
I just have a few Questions:
1. can we change the tempo(speed) of a music file in java.
2. where should i start. have heard about JAVA API .
Basically all i want to know is what are the limits of java in relation to this.
any advice would be appreciated
Whoa, you are taking an awfully big bite at one setting. This is a somewhat ambitious project for someone who hasn't programmed before. This can likely be done, but you'll have to have a lot of the basics of programming under your belt before tackling this very project.
Are you planning on using MIDI files? If so there are midi commands for changing tempo.
Have you gone to the Sun Java and Swing tutorials? That's where you should start -- basic Java first, then Swing.
Can Java do this? Absolutely. Can Swing be used? Absolutely. Have a look here:
Understanding and using Java MIDI audio
Overview of the Sampled Package (The Java™ Tutorials > Sound)
Also you will want to keep various components of your program separate, mainly the GUI needs to be kept separate from the program logic which needs to be separate from the file I/O.
Last edited by Fubarable; 09-15-2008 at 01:01 AM.
- 09-16-2008, 07:01 PM #3
I'm quite comfortable with swing(thanks to the extensive tutorial available).
have started reading the java sound tutorial. The Main reason for doing this is not only the need for a customized drumming machine but also to understand how sound is accepted and played by the machine(computer).Just read a few pages and have learnt a lot.
As for the Complexity .I'll spend some time deciding the design(as simple as possible).try some simple stuff. Then build the main thing.Have time on my hands(Besides we always have time for the things we Love).Lets see how it works out.
Can the tempo be changed in case of a "wav" file.
Thanks for the link.Checking them out.
I'm no sound expert, not even a novice, but from what I know, a "wav" file some represents a wave form, whereas a midi file represents a logical representation of musical notes (including percussion). The latter can have tempo changes easy and was built for such a thing. With the former, I imagine it can be done, but lord knows what complex transformations (and the distortions this would cause) would have to be performed.
My bet would be to use MIDI and somehow arrange to sample your own drum sounds.
- 09-17-2008, 06:07 PM #5
Also i thinking of using a jtable to display a beat(TableModel).
One row for an entire drum component(eg 4/4 beat =16columns) on selecting a particular cell in that row you activate the drum beat for that instance.
and then you the entire row can be played etc and so on.
(I hope its clear).
Do you have better idea too this? Like any other swing component swing
this purpose better.Just let me know.
You've been been great help.have a nice day.
Last edited by goodwillwins; 09-17-2008 at 06:11 PM.
Actually Swing will have nothing to do with this at all. It will only provide a framework to display the visuals of your code, but this should be totally separate from the actual mechanics of your code.
But I digress. Your questions are beyond me (thought that's not saying much). You would do well to find a forum or blog that works in this area of computers and music. This isn't a Java specific problem, so I don't think that you will have to limit your searches to that. Either that or hope someone answers this thread who is actually smart and knowledgeable on this subject.
Whatever happens, if you remember and if this project comes to fruition, it'd be great if you posted some type of follow-up here.