Procedural midi

Discussion in 'General Off-Topic Chat' started by drake7707, May 31, 2011.

May 31, 2011

Procedural midi by drake7707 at 3:50 PM (1,364 Views / 0 Likes) 17 replies

  1. drake7707
    OP

    Newcomer drake7707 Member

    Joined:
    Feb 12, 2006
    Messages:
    33
    Country:
    Belgium
    After playing with otomata (which I'm sure some of you have already tried out here: http://www.earslap.com/projectslab/otomata) I wanted to write my own implementation using the same ruleset, but with extra features and a way to export to midi.

    So I created Procedural Midi:

    [youtube]sVgDxZQ8hYc[/youtube]

    You can download it from http://proceduralmidi.codeplex.com/.

    If anyone wants to port it to NDS, the source code is available and fully documented (it's not all that much code really).

    Have fun!
     
  2. Rydian

    Member Rydian Resident Furvert™

    Joined:
    Feb 4, 2010
    Messages:
    27,883
    Location:
    Cave Entrance, Watching Cyan Write Letters
    Country:
    United States
    Man this seems pretty crazy. XD
     
  3. Berthenk

    Member Berthenk Epitome of Awesomeness

    Joined:
    May 16, 2008
    Messages:
    1,314
    Country:
    Netherlands
    The link is borked, please remove the ) at the end. [​IMG]
    Watched the video a bit; it looks addicting. I downloaded it; it sure is!
    Mind changing the right mouse to remove?
     
  4. Smartpal

    Member Smartpal The Guitar Guy

    Joined:
    Feb 10, 2009
    Messages:
    1,037
    Location:
    New Delhi, India
    Country:
    India
    This is friggin' sweet.
     
  5. Ace

    Member Ace GBATemp's Patrick Bateman

    Joined:
    Apr 8, 2009
    Messages:
    1,035
    Location:
    Manhattan
    Country:
    Sweden
    I will seriously use this when I record more synthy stuff. But it seems MIDI exporting isn't working properly :/ I tried adding it to some MIDI editors, and they all glitch out on me. Playing the MID files also glitches up WMP.

    Something to think about for the next few releases: Multiple Tracks, adding VST's/other effects to the tracks, a few built in scales that can be switched while playing (sort of like Wolfram's random MIDI generator), and diagonal movement (if possible). Also, since it's already using some sort of MIDI, a way to use SoundFont files instead of just the standard midi sounds and the samples (it could possibly make some of the best chiptune out there)

    This may seem like a lot, but by god, it would open up a whole new world to music!

    ACEDIT: http://www.earslap.com/projectslab/otomata...v4031213z2z2d2o
     
  6. ChaosZero816

    Member ChaosZero816 Temp's Official Random Member

    Joined:
    Apr 6, 2011
    Messages:
    213
    Location:
    Somewhere maybe??o_o
    Country:
    Philippines
    This looks interesting.

    Might use this in the future.
     
  7. Ace

    Member Ace GBATemp's Patrick Bateman

    Joined:
    Apr 8, 2009
    Messages:
    1,035
    Location:
    Manhattan
    Country:
    Sweden
  8. drake7707
    OP

    Newcomer drake7707 Member

    Joined:
    Feb 12, 2006
    Messages:
    33
    Country:
    Belgium
    Thanks for the feedback, I appreciate it [​IMG].

    I'll look into the issues and try to fix them. I've had some trouble making the midi export and I was glad it finally worked in winamp and media player classic, it somehow still refused to work in my old version of guitar pro (which I thought it was because it was an old version and I've had other issues with it too), but apparently getting it to work in there would probably be a good test case.

    I'll take note of the feature requests too, if anyone else thinks of something let me know [​IMG]
     
  9. drake7707
    OP

    Newcomer drake7707 Member

    Joined:
    Feb 12, 2006
    Messages:
    33
    Country:
    Belgium
    I created a new release that addresses the midi export (apparently some meta data is required by some applications) and some other things:

    http://proceduralmidi.codeplex.com/releases/view/67517


    I've looked into the soundfont support but as far as I can see there's no .NET library that allows me to play notes from an sf2 file (NAudio can read soundfont files but can't play them afaik), so if they ever get added I'll have to code it myself (and by the looks of it, it's pretty complex).

    Let me know if midi works correctly now, I've tested the import on my gp4 and it worked fine after I added the end_of_track and set_tempo meta events.
     
  10. Ace

    Member Ace GBATemp's Patrick Bateman

    Joined:
    Apr 8, 2009
    Messages:
    1,035
    Location:
    Manhattan
    Country:
    Sweden
    I'm not completely sure, but perhaps this might be able to help you: http://mark-dot-net.blogspot.com/2008/06/i...io-toolkit.html Unless this is what you referred to in your previous post.

    Also, your MIDI fix works on Guitar Pro 5, as well as GXSCC. One issue with it is that it leaves about a second of the MIDI file empty, although this can easily be fixed manually.

    Another current issue is that opening text files and reloading is currently broken. I get an error: 'Could not open file, error: System.ArgumentOutOfRangeException', followed by something about value '0' not being valid for 'Value'. And something about 'Value' has to be between 'Minimum' and 'Maximum'

    Other than that, nice work! You've built a lot on top of the already awesome program. I can definitely see myself using this sometime soon for recording, if it could be used as a VST MIDI controller of sorts (like they described on Overclocked ReMix forums)

    ACEDIT: http://naudio.codeplex.com/ Would probably be better to go to than the link I gave above [​IMG] But it seems you knew about this library already.

    ACEDIT2: It would also probably be a good idea to ask the creator of the NAudio library on the codeplex website, if you haven't already, too [​IMG]
     
  11. drake7707
    OP

    Newcomer drake7707 Member

    Joined:
    Feb 12, 2006
    Messages:
    33
    Country:
    Belgium
    I fixed the loading error, gah stupid me.
     
  12. Skarigon

    Newcomer Skarigon Member

    Joined:
    May 31, 2011
    Messages:
    10
    Country:
    Israel
    Hmm, so far this seems pretty damned cool.

    Would it be possible to make a "generate MIDI for states x to y" option?

    Also, it seems to me that the wavesample data in .nds file's .sdat files makes for really great instruments.

    If you mind, could you also create some kind of musical scale preset database/save option? (Like the one WolframTones has) it is kind of a bother to manually input some scales.


    Also: http://www.earslap.com/projectslab/otomata...i3o7d0j5j6x1n80 (Let it change, its a gradual change)

    Otherwise, I have to say, great job, this is really cool, and I could see myself playing with this a lot.
     
  13. drake7707
    OP

    Newcomer drake7707 Member

    Joined:
    Feb 12, 2006
    Messages:
    33
    Country:
    Belgium
    I've created a first version of a VST plugin, it's available on http://proceduralmidi.codeplex.com/

    I've only tested it in VSTHost, so I don't know in what other hosts it will work. It seems some are more picky than others about certain things.


    I could provide a dropdown with predefined scales, if you could give/link me a list of scales with their names.

    Generating a midi for x number of next states would also be possible. I don't keep track of previous states though, so it will always be for future states.
     
  14. drake7707
    OP

    Newcomer drake7707 Member

    Joined:
    Feb 12, 2006
    Messages:
    33
    Country:
    Belgium
    I've uploaded a new version with the VST included in the main package (http://proceduralmidi.codeplex.com/):

     
  15. Ace

    Member Ace GBATemp's Patrick Bateman

    Joined:
    Apr 8, 2009
    Messages:
    1,035
    Location:
    Manhattan
    Country:
    Sweden
    Code:
    Default=D3, A3, A#3, C4, D4, E4, F4, A5, C5
    Adonai Malakh=D3, D#3, E3, F4, G4, A4, B5, C5
    Aeolian Flat1=D3, F3, F#3, G#4, A#4, B5, C#5
    Algerian=D3, E3, F3, G4, G#4, A4, A#5, C#5
    Altered Pentatonic=D3, D#3, G4, A5, B5
    Alternating Tetramirror=D3,D#4, F4, F#5
    Arezzo Major Diatonic Hexachord=D3, E3, F#4, G4, A5, B5
    Augmented Chord=D3, F#4, A#5
    Balinese Pentachord=D3, D#3, F#4, G#4, A5
    Bhairubahar Thaat=D3, D#3, F#3, G4, A5, B5, C#5
    Bi Yu=D3, F4, A5, C5
    Blues=D3, F3, G3, G#4, A4, C5
    Blues Diminished=D3, D#3, F3, F#4, G#4, A4, B5, C5
    Blues Dorian Hexatonic=D3, E3, F3, F#4, A5, B5
    Courtesy of WolframTones.
    ----------
    Instructions:

    Copy all entries in code tags
    Save as scales.txt
    Put scales.txt in the same folder as ProceduralMIDI

    ----------
    I might continue this if time allows.
    ----------

    I tried the VST: It didn't work on Cubase 5.1. It opened, but I could figure out how to record...
     
  16. Skarigon

    Newcomer Skarigon Member

    Joined:
    May 31, 2011
    Messages:
    10
    Country:
    Israel
    Thanks for the option to change the scales!

    Also, a recording of a word or a short phrase as the sample makes for surprisingly good results.
     
  17. drake7707
    OP

    Newcomer drake7707 Member

    Joined:
    Feb 12, 2006
    Messages:
    33
    Country:
    Belgium
  18. Terminator02

    Member Terminator02 ヽ( 。 ヮ゚)ノ

    Joined:
    Apr 10, 2010
    Messages:
    4,517
    Location:
    Somewhere near monkat
    Country:
    United States
    checking it out right now, and thanks for bumping this, i somehow missed it the first time around [​IMG]
     

Share This Page