Creating a MIDI file

N

Natanael Mignon

Hi folks,

new here, not yet received any posts, so if this question has already been
answered, please drop me a link to the according answers, thanks. :)

I am working on a little project to "create melodies with evolving recurrent
neural networks" employing a hopfield net etc., but that's not the main
point. My actual question is regarding the creation of the output: I want
to write MIDI files.

Now I found the "Java Sound Programmer's FAQ" and such things, but they
didn't help me out here yet. It's all about playing midi files or saving
audio data to .wav or .aiff - not my stuff. :-(

Any hints or ideas? Thanks a lot in advance!

Kind regards,
--
- Nat

www.bleeding.de | www.metal-germany.de

-= Bleeding for Metal | c/o Madhouse Of Cain =-
-= P.O. Box 39 23 | 30039 Hannover | Germany =-
 
S

S. Balk

new here, not yet received any posts, so if this question has already been
answered, please drop me a link to the according answers, thanks. :)

I am working on a little project to "create melodies with evolving recurrent
neural networks" employing a hopfield net etc., but that's not the main
point. My actual question is regarding the creation of the output: I want
to write MIDI files.

Now I found the "Java Sound Programmer's FAQ" and such things, but they
didn't help me out here yet. It's all about playing midi files or saving
audio data to .wav or .aiff - not my stuff. :-(

see the javadocs at: javax.sound.midi.spi.MidiFileWriter
 
N

Natanael Mignon

Hi,

S. Balk said:
see the javadocs at: javax.sound.midi.spi.MidiFileWriter
Yes, got somewhat further by now.

At the moment I have got: a sequence, a synthesizer with channels and
instruments loaded from a soundbank. I am currently studying everything
about connecting transmitters, receivers and looking for the point where I
will write to a damn file in the end. ;-)

Thanks,
--
- Nat (open for further comments and tips of course!)

www.bleeding.de | www.metal-germany.de

-= Bleeding for Metal | c/o Madhouse Of Cain =-
-= P.O. Box 39 23 | 30039 Hannover | Germany =-
 
R

Roedy Green

I am working on a little project to "create melodies with evolving recurrent
neural networks" employing a hopfield net etc., but that's not the main
point. My actual question is regarding the creation of the output: I want
to write MIDI files.
see http://mindprod.com/jgloss/midi.html
and follow the link marked "how to generate MIDI files"

Java provides quite a bit of MIDI support right out the box.

On top of that, MIDI is somewhat simpler than I imagined it would be.
There is basically a command to start each note with an attack
velocity and another to release. The midi stream itself sent to an
instrument has no timing information it in. The instrument just plays
the command as soon as it arrives. "Player piano" midi songs
obviously do have timing information embedded though.

The thing I want to play with some day is what sort of music happens
if you use an 8-tone or 16-tone instead of a 12-tone base. Though I
suspect it would not be euphonious, It might be interesting to hear
other bases like 7 and 10.
 
N

Natanael Mignon

Hi!

Roedy said:
see http://mindprod.com/jgloss/midi.html
and follow the link marked "how to generate MIDI files"
Oh, great, real code examples! Thanks a lot!
On top of that, MIDI is somewhat simpler than I imagined it would be.
There is basically a command to start each note with an attack
velocity and another to release. The midi stream itself sent to an
Yeah, I found out about those things yesterday as well. Looks pretty "easy"
to me, a nice playground indeed.
The thing I want to play with some day is what sort of music happens
if you use an 8-tone or 16-tone instead of a 12-tone base. Though I
suspect it would not be euphonious, It might be interesting to hear
other bases like 7 and 10.
Mmmhh, sounds interesting. Meanwhile I am looking forward to hearing what my
neural networks will produce as output, hehe. :)

Regards,
--
- Nat

www.bleeding.de | www.metal-germany.de

-= Bleeding for Metal | c/o Madhouse Of Cain =-
-= P.O. Box 39 23 | 30039 Hannover | Germany =-
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top