First mcjMidiLoad Beta Available - Midi File loader script for Daz Studio

1235710

Comments

  • mCasualmCasual Posts: 4,607
    edited April 2015

    v003 - v003 - v003 - v003 - v003 - v003 - tired update ! - v003 - v003 - v003 - v003 - v003 - v003 - v003 -


    the 2h30 am update, version 003

    was functionnal under DS4.7 in the 2 or 3 tests i made

    contrary to version 002 which only worked under DS3

    ----

    there will be other versions you can count on that

    but this Beta seems to work enough to have fun!

    i'll write the manual tomorrow

    but if you read my, say, 7 recent forum posts you should be able to figure it all

    roughguide.jpg
    1920 x 1080 - 362K
    inds47.gif
    400 x 400 - 308K
    Post edited by mCasual on
  • ImagoImago Posts: 5,152
    edited December 1969

    Where can I find the executable?

  • mCasualmCasual Posts: 4,607
    edited December 1969

    Where can I find the executable?
    Pre-requisite: the midi-to-text utility mf2t.exe

    My Daz Scripts ( at least for now ) don't directly read the content of midi ( *.mid) files
    instead they expect to be fed text files ( .txt )
    produced by the midi-to-text utility named mf2t

    the windows PC version can be downloaded here:

    http://mf2t-win32.sourceforge.net/

    there's a Mac/OSX version here
    https://code.google.com/p/midi2text/downloads/detail?name=MacMIDIt2mf_v1.5.0.zip&can=2&q=

    but i cant promise my script will be able to handle their text files

    i installed ( unzipped ) mine in c:\Program Files\mf2t

  • KeironKeiron Posts: 413
    edited December 1969

    Hi Casual

    Had me going there for a bit

    I downloaded the midi to file MF2t xxxxxxxx and unzipped it to the programs c drive
    but i got an error when trying to use it

    However I changed the unzipped folder from mf2t-win32-20110205 to mf2t and it looks good
    Ill keep you posted

  • KeironKeiron Posts: 413
    edited April 2015

    Hi Casual

    Some odd things were happening so I've started from scratch

    Created a new song and saved the MIDI file and Wave
    track 1 right piano
    track 2 left piano
    track 3 right String

    track 9 Percussion
    track 10 Percussion

    Track 11 - 16 backings

    I've Loaded a Midi file OK
    Created the Text file OK
    I've added 14 Kyb VU's Channel 1 - 8 and Channels 11 - 16 and 2 Drum VU's on channel 9 and 10 into the scene for the 16 MIDI channels

    Channel 1 and 3 in theory should same but im im seeing them play at different note locations?

    Answer

    The Keyboard is sending the notes played, but 1 octave lower on channel 3 than on channel 1
    Must admit I wasn't expecting that one LOL as it wasn't what i'd played
    Ok I'll crack on now that's explained

    Looking good so far

    Kindest wishes

    Keiron

    Image3.jpg
    1917 x 1185 - 297K
    Image2.jpg
    1912 x 1200 - 298K
    Image1.jpg
    1907 x 1188 - 266K
    Post edited by Keiron on
  • ImagoImago Posts: 5,152
    edited December 1969

    Casual said:
    Pre-requisite: the midi-to-text utility mf2t.exe

    My Daz Scripts ( at least for now ) don't directly read the content of midi ( *.mid) files
    instead they expect to be fed text files ( .txt )
    produced by the midi-to-text utility named mf2t

    the windows PC version can be downloaded here:

    http://mf2t-win32.sourceforge.net/

    there's a Mac/OSX version here
    https://code.google.com/p/midi2text/downloads/detail?name=MacMIDIt2mf_v1.5.0.zip&can=2&q=

    but i cant promise my script will be able to handle their text files

    i installed ( unzipped ) mine in c:\Program Files\mf2t

    Thanks, I'll try it immediately! ^.^

  • ImagoImago Posts: 5,152
    edited December 1969

    It wont work for me!
    I can't convert a midi or use a text file in any way!

  • mCasualmCasual Posts: 4,607
    edited December 1969

    keiron said:
    but 1 octave lower ...

    there must be a 'transpose' setting per channel somewhere

  • mCasualmCasual Posts: 4,607
    edited April 2015

    It wont work for me!
    I can't convert a midi or use a text file in any way!

    i go to http://sourceforge.net/projects/mf2t-win32/?source=directory

    i download mf2t-win32-20110205.zip

    i unzip this into C:\Program Files (x86)

    using explorer i go see what happened

    i see the folder mf2t-win32-20110205

    i rename the folder to mf2t

    i open DS 4.7

    i create a primitive Cylinder, 1ft diameter, 6ft tall

    i select the cylinder with my mouse

    i start the script mcjMidiLoad.dsa

    now i must tell mcjMidiLoad the location of mf2t.exe

    i click the Locate Converter button and i browse up to C:\Program Files (86)/mf2t/

    i select the mf2t(.exe) file and click Open

    i click the convert midi to text button

    i browse to and select c:\windows\media\town(.mid)

    i think i saw something flash on screen but i'm not sure if it worked !

    i click the "Load text" button

    mcjMidiLoad expects to find town.mid.txt in the same folder as town.mid

    but it's not there

    why?

    maybe because that folder is only writable to by programs with high administrative privileges

    so

    i copy town.mid to ....... C:\Users\Public\Music

    i click the convert midi to text button

    i browse to and select C:\Users\Public\Music\town(.mid)

    i click the "Load text" button

    tada the town.mid.txt file was created!

    the rest of this demonstration will be on the distribution/manual web page uhhh

    we type mcjMidiKit in google and bam! the google robots indexed my page last night!

    https://sites.google.com/site/mcasualsdazscripts5/mcjmidikit

    tons.jpg
    1106 x 592 - 182K
    itsthere.jpg
    1160 x 582 - 170K
    convert.jpg
    688 x 578 - 156K
    mftwotee.jpg
    1920 x 892 - 462K
    Post edited by mCasual on
  • KeironKeiron Posts: 413
    edited December 1969

    Re Transpose

    I think your right LOL

    Did you have any luck with the 88 keyboard?

    I loaded the 66 key Wurzkeil

    i can make it bounce LOL

    I seem to have to keep shuting down the Script to choose a different prop or part of a prop

    I'm choosing say note c
    Selecting the channel in my case 1 for lower 2 for higher
    in the range i've selected 60 and 60
    Target Nodes only shows note 60 the other notes arn't listed
    in the Target morph i've selected x rotate
    Assign channel to instrument
    I noticed here you can add other settings, but I have to close it down to get to the next key
    when I reopen the script I then have no Idea what I did before
    Is this the best way to go forward or is there an easier way

  • mCasualmCasual Posts: 4,607
    edited April 2015

    keiron said:
    Re Transpose

    I think your right LOL

    Did you have any luck with the 88 keyboard?

    I loaded the 66 key Wurzkeil

    i can make it bounce LOL

    I seem to have to keep shuting down the Script to choose a different prop or part of a prop

    I'm choosing say note c
    Selecting the channel in my case 1 for lower 2 for higher
    in the range i've selected 60 and 60
    Target Nodes only shows note 60 the other notes arn't listed
    in the Target morph i've selected x rotate
    Assign channel to instrument
    I noticed here you can add other settings, but I have to close it down to get to the next key
    when I reopen the script I then have no Idea what I did before
    Is this the best way to go forward or is there an easier way

    the objective of the 1st release is to have just enough to animate something, based on midi music

    the keyboards will use a different method
    there will be a text file which links each midi note to a morph or rotation or material
    i'll supply the text file for the wurzkweils
    it will be possible and not excessively difficult to adapt this to any prop or figure or even do many props

    the script only sees 1 selected object and any mcjMidiVUs props in the scene
    version 4 will probably let you select more than 1
    it will also have a save button to save the assignations you made

    Post edited by mCasual on
  • KeironKeiron Posts: 413
    edited April 2015

    Hi Casual

    Many thanks

    Your hard work is much appreciated

    Post edited by Keiron on
  • mCasualmCasual Posts: 4,607
    edited December 1969

    There's a new demonstration video

    but to see it you have to go see the nice instruction manual i worked on today :)

    https://sites.google.com/site/mcasualsdazscripts5/mcjmidikit

  • KeironKeiron Posts: 413
    edited April 2015

    Hi Casual

    Great work

    I to have the cylinder Popping up and Down great fun

    Excellent

    Many thank's off to play for ages LOL

    PS my Cylinder was the wrong size, but then I saw the% 50% and 150% not 50 and 150

    How to I get the hand to stick to the cylinder?

    I've also noticed a problem with Daz Studio
    from new
    I added the cylinder and the Genesis 2 figure
    I moved Genesis 2 to the left
    Hit play and Geneses moves
    Looking at the Timeline it's on frame 30 not 0
    so the Genesis 2 figure transitions in the 0 to 30 frame period

    Using Keymate I can move the Objects in the Scene to start position 0
    I also use Animate 2 to fix the position of an Object

    Post edited by Keiron on
  • ImagoImago Posts: 5,152
    edited April 2015

    Casual said:
    It wont work for me!
    I can't convert a midi or use a text file in any way!

    i go to http://sourceforge.net/projects/mf2t-win32/?source=directory

    i download mf2t-win32-20110205.zip

    i unzip this into C:\Program Files (x86)

    using explorer i go see what happened

    i see the folder mf2t-win32-20110205

    i rename the folder to mf2t

    i open DS 4.7

    i create a primitive Cylinder, 1ft diameter, 6ft tall

    i select the cylinder with my mouse

    i start the script mcjMidiLoad.dsa

    now i must tell mcjMidiLoad the location of mf2t.exe

    i click the Locate Converter button and i browse up to C:\Program Files (86)/mf2t/

    i select the mf2t(.exe) file and click Open

    i click the convert midi to text button

    i browse to and select c:\windows\media\town(.mid)

    i think i saw something flash on screen but i'm not sure if it worked !

    i click the "Load text" button

    mcjMidiLoad expects to find town.mid.txt in the same folder as town.mid

    but it's not there

    why?

    maybe because that folder is only writable to by programs with high administrative privileges

    so

    i copy town.mid to ....... C:\Users\Public\Music

    i click the convert midi to text button

    i browse to and select C:\Users\Public\Music\town(.mid)

    i click the "Load text" button

    tada the town.mid.txt file was created!

    the rest of this demonstration will be on the distribution/manual web page uhhh

    we type mcjMidiKit in google and bam! the google robots indexed my page last night!

    https://sites.google.com/site/mcasualsdazscripts5/mcjmidikit

    Everything was installed in a non-administrative folder in C:
    I have to install the executable in "program files" folder?
    Even doing that I get the error message.

    Error.jpg
    1366 x 768 - 385K
    Post edited by Imago on
  • KeironKeiron Posts: 413
    edited April 2015

    Hi

    "Everything was installed in a non-administrative folder in C:
    I have to install the executable in “program files” folder?
    Even doing that I get the error message."

    After downloading the zip file
    I have unziped it to the Programs folder
    the unzipped folder name was renamed to mf2t
    i then pointed the script to this folder
    I am using an account with full Admin

    Post edited by Keiron on
  • KeironKeiron Posts: 413
    edited December 1969

    Hi Casual

    well ive got the Wurzell Keyboard to animate to a midi file LOL
    just brill well done

    I have a couple of questions

    I noticed you can add different actions tranlate x, tranlate y etc. How do I delete that action, if I have made a mistake?
    I also noticed if I reselect the object in the case of the keyboard say note c and change again it adds this on top of the one i did before

    It would be nice to see an editable table of the animations etc so you can check for mistakes and correct them

    Now having spent a long time setting up the keyboard to animate with all the notes, is there a way to leave the settings and just change the midi file so it plays a new one with the same settings

    I managed to get dragon 3 to move it's face around to music need to play more with that

    This is great fun thank you

  • ImagoImago Posts: 5,152
    edited December 1969

    keiron said:
    Hi

    "Everything was installed in a non-administrative folder in C:
    I have to install the executable in “program files” folder?
    Even doing that I get the error message."

    After downloading the zip file
    I have unziped it to the Programs folder
    the unzipped folder name was renamed to mf2t
    i then pointed the script to this folder
    I am using an account with full Admin


    I followed step by step the Mcasual's guide for the installation.
    I downloaded the file, unzipped it on my desktop, renamed, moved to the programs folder, started DAZ, created a cilinder, selected it, ran the script, located the executable... But when I choose to convert a Midi file in c:/music it gives me that error.

  • KeironKeiron Posts: 413
    edited April 2015

    Hi
    Looks like you have done what's needed

    so just to confirm

    you have downloaded this Zip file

    mf2t-win32-20110205.zip

    Unzipped it

    renamed the folder to

    mf2t
    note mine is in lower case

    placed mf2t folder and contents in c:\program folder "64 bit programs" assuming your using the Daz Studio Pro 4.7

    added a drum shape and selected it

    ran script and pointed to the mf2t folder

    The only thing Im doing different is I have the midi file on my desktop
    and the created text file also ends up there

    I believe the midi file should be type 1

    Post edited by Keiron on
  • mCasualmCasual Posts: 4,607
    edited April 2015


    I followed step by step the Mcasual's guide for the installation.
    I downloaded the file, unzipped it on my desktop, renamed, moved to the programs folder, started DAZ, created a cilinder, selected it, ran the script, located the executable... But when I choose to convert a Midi file in c:/music it gives me that error.

    maybe you are using v001 of mcjMidiLoad, the current version is v003

    the mf2t.exe file and the accompanying .dll files that come with it
    should work as long as they are in a folder where all users are allowed to execute it

    - its important that you click at least once the mcjMidiLoad's button then browse up to mf2t.exe then select the mf2t.exe file then click the 'open' button

    - maybe the security setup is different for your Windows, or for the specific "DS4.7Pro Public Build " ... build

    - maybe mf2t doesnt 'understand' the midi file, i know it worked fine with the sample midi files in Windows/media
    BUT i did have to move them to a public folder, because mf2t was blocked from writing the .txt file in the Windows/Media folder

    in an upcoming version i'll allow the .txt file to be produced in a different folder than the midi file


    in the meantime you could try this


    open notepad

    type

    
    "C:\Program Files (x86)\mf2t\mf2t.exe" %1 %1.txt
    

    or

    
    "C:\Program Files\mf2t\mf2t.exe" %1 %1.txt
    

    save this as a plain-text file under the name Mf2TDragnDrop.bat

    save it in the same folder as the midi files, it has to be a public folder

    drag and drop the midi file on the Mf2TDragnDrop.bat

    a text with the same name but the extension .mid.txt should be created

    w1.jpg
    960 x 720 - 205K
    v0.jpg
    1066 x 325 - 105K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited April 2015

    keiron said:
    Hi Casual

    ....well ive got the Wurzell Keyboard ....


    yesterday i made a DS1 DS2 compatible version and found some bugs
    so v004 for instance will have the correct notes list after pressing the 'Load Text' button
    instead of having to close and re-open mcjMidiLoad

    and most probably i'll integrate the code i used to animate the wurzkeil in the demonstration videos

    the assignations for the 61 or 88 notes will be in a text file
    so it will pretty much be as simple as selecting the channel,
    then somehow selecting the assignation file designed for that keyboard and clicking the apply button

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited April 2015

    later today, version 4 - now compatible with DS1 DS2
    with some bugs fixed
    and support for keyboard-animation

    oh my 2009
    see the 2nd image,
    the characters are in fact static props not ''heavy'' figures
    some are at the beginning of the hand clap, some are at the end
    by switching places 30 times per second one can make them all appear to clap hands

    maikos.jpg
    1920 x 892 - 621K
    bassooOoOOoOn.jpg
    823 x 730 - 202K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited April 2015

    note that for visualization and basic editing of animation curves there's my SceneGraf plugin

    there's a version for DS3 and one for DS4.x

    http://www.daz3d.com/forums/discussion/14275/

    and there's the script for DS 1,2,3,4 mcjCycle filter which is better suited for cycling animations
    but can also let you view and greatly modify / generate animation curves

    https://sites.google.com/site/mcasualsdazscripts/mcjcyclefilter

    fig1.jpg
    1172 x 759 - 105K
    mcjcf_fig3.png
    960 x 614 - 27K
    Post edited by mCasual on
  • KeironKeiron Posts: 413
    edited April 2015

    Hi Casual

    Yey !! many flags are up and flying

    An 88 Key Keyboard Animated

    Rotate x =7
    Y translate -.9

    Works on the Wurzell too

    Couple of errors on the notes typo's but hopefully they can be corrected

    https://youtu.be/uI8FqdFkJUc

    Casual you are a star

    Post edited by Keiron on
  • mCasualmCasual Posts: 4,607
    edited April 2015

    in the upcoming v004

    new button to save time when converting midi to .wav

    timidity is a free soft-synth which accepts soundfont banks/instruments

    for a mysterious reason the command line version cant be directly used by mcjMidiLoad
    else we would have a one click midi to wav solution

    sodtsynth.jpg
    860 x 588 - 193K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited April 2015

    keiron said:

    ... hands

    i created a null node
    and animated its Y position using the same slap-Bass notes as the cylinder

    then i used ( the essential daz animation tool ) mcjAutoLimb2014
    to make her hand follow that node

    http://www.daz3d.com/forums/discussion/43130/

    note that mcjAutoLimb2014 will be a pre-requisite for the pianist hand placement script
    that script animates 2 null nodes that move along the length of the keyboard
    then mcjAutoLimb2014 can be used to compute the hundreds of poses to get the hands to follow the nodes

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited April 2015

    for keyboard types of assignations

    there will be a separate script

    so you use mcjMidiLoad to convert and load the midi file
    and can do node-by node assignations

    and for polyphonic things like keyboards
    you use mcjMidiTransfer

    which will support
    - properties animation
    - morphs animations
    - material properties animations ( strengths and colors )
    - pose-animation-scripts

    eventually mcjMidiLoader will also do materials and pose-scripts


    with a pose script, you can assign a movement that begins before the
    note actually happens and can end after the note event ends

    which is how i did the drumming and pianotting

    pianaux.gif
    480 x 360 - 736K
    tamoro.jpg
    984 x 836 - 276K
    Post edited by mCasual on
  • KeironKeiron Posts: 413
    edited April 2015

    Hi Casual

    I found the site below was very usefull, it gives you all the note asignments

    http://www.electronics.dit.ie/staff/tscarff/Music_technology/midi/midi_note_numbers_for_octaves.htm

    I used that to put all the key info in for all 88 keys, took about 2 hrs, maybe it could be saved as a pose file for another day

    Looks like the 88 keyboard is coming along great

    Could I ask for a few controls that would be usefull

    Pedal 1, 2 and 3 Sustaining, or damper pedal, Sostenuto pedal, Asignable
    Breath for wind instruments
    Pitch Bend for Synths and Guitars
    Modulation for the Keyboard
    Volume for Piano, Keyboard, Guitars and all

    PS just looked at your crowd great Idea
    Could have them doing a cyclic wave, like at footie stadium LOL

    I did try to see how many people I could add into a scene, my PC went on strike a few times even though I had Memory and Processing power available.
    So instead of using clothes and hair, I used Victoria 4.2 and Michael 4 and used the painted textures
    I only added Head and Body morphs so they could dance
    I managed to get around 38 all dancing differently using Animate 2 Dance blocks, I think I hit the limit on how many Characters Animate 2 could handle as not all would show up.

    Post edited by Keiron on
  • ImagoImago Posts: 5,152
    edited December 1969

    Casual said:

    I followed step by step the Mcasual's guide for the installation.
    I downloaded the file, unzipped it on my desktop, renamed, moved to the programs folder, started DAZ, created a cilinder, selected it, ran the script, located the executable... But when I choose to convert a Midi file in c:/music it gives me that error.

    maybe you are using v001 of mcjMidiLoad, the current version is v003

    the mf2t.exe file and the accompanying .dll files that come with it
    should work as long as they are in a folder where all users are allowed to execute it

    - its important that you click at least once the mcjMidiLoad's button then browse up to mf2t.exe then select the mf2t.exe file then click the 'open' button

    - maybe the security setup is different for your Windows, or for the specific "DS4.7Pro Public Build " ... build

    - maybe mf2t doesnt 'understand' the midi file, i know it worked fine with the sample midi files in Windows/media
    BUT i did have to move them to a public folder, because mf2t was blocked from writing the .txt file in the Windows/Media folder

    in an upcoming version i'll allow the .txt file to be produced in a different folder than the midi file


    in the meantime you could try this


    open notepad

    type

    
    "C:\Program Files (x86)\mf2t\mf2t.exe" %1 %1.txt
    

    or

    
    "C:\Program Files\mf2t\mf2t.exe" %1 %1.txt
    

    save this as a plain-text file under the name Mf2TDragnDrop.bat

    save it in the same folder as the midi files, it has to be a public folder

    drag and drop the midi file on the Mf2TDragnDrop.bat

    a text with the same name but the extension .mid.txt should be created

    I assure you that I'm using the lastest version of everything and followed your guide at perfection.
    But I'll try that command line, since it looks the only way to use it.
    I'll wait for version 004 hoping it will work fine.
    Thanks!

  • mCasualmCasual Posts: 4,607
    edited April 2015


    .....
    I'll wait for version 004 hoping it will work fine.
    .....
    Thanks!

    in the meantime if you have some time to spend on this

    you could open mcjMidiLoad.dsa in notepad

    look for a line that reads

    if( !process.launch( clientName ) )

    and replace it with

    te.append( aArgs )
    te.append( App.appName )
    if( !process.launch( App.appName ) )

    the first line will print out the command that mcjMidiLoad is asking Windows to execute
    which will look something like

    C:/Program Files/mf2t/mf2t.exe,I:/aoa/mocap/midi/pop/2become1.mid,I:/aoa/mocap/midi/pop/2become1.mid.txt

    the second line prints out the name of your Daz Studio version
    the third line is the launch operation itself
    my hypothesis was that Windows was refusing to launch mf2t
    because mcjMidiLoad was telling Windows "i'm asking this on behalf of my lord Daz Studio"
    but Windows was answering "No way you liar, your lord's name is "Daz Studio Public Build 4.7 Pro"

    Post edited by mCasual on
Sign In or Register to comment.