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

2456710

Comments

  • mCasualmCasual Posts: 4,607
    edited March 2015

    keiron said:

    ... MIDI type 1 but wouldn't accept MIDI type 0 ......, some stayed down, so

    i refreshed my UTAU skills, because i want a singer for the voice track

    it's not very good, but more interesting than a midi-reed organ

    http://mcasual.x10.mx/charona.avi

    thunderdome2.jpg
    1920 x 1080 - 1M
    lindy.jpg
    1000 x 1000 - 675K
    pinky.jpg
    1000 x 1000 - 561K
    Post edited by mCasual on
  • RuphussRuphuss Posts: 2,631
    edited December 1969

    Casual said:
    keiron said:

    ... MIDI type 1 but wouldn't accept MIDI type 0 ......, some stayed down, so

    i refreshed my UTAU skills, because i want a singer for the voice track

    it's not very good, but more interesting than a midi-reed organ

    http://mcasual.x10.mx/charona.avi

    what is UTAU ?

  • KeironKeiron Posts: 413
    edited December 1969

    UTAU

    Might be this

    A shareware vocal synthesizer program unlike VOCALOID, VOCALOID2, and VOCALOID3, which are commercially-sold programs with an accompanying voice bank

  • mCasualmCasual Posts: 4,607
    edited March 2015

    ruphuss said:
    Casual said:
    keiron said:

    ... MIDI type 1 but wouldn't accept MIDI type 0 ......, some stayed down, so

    i refreshed my UTAU skills, because i want a singer for the voice track

    it's not very good, but more interesting than a midi-reed organ

    http://mcasual.x10.mx/charona.avi

    what is UTAU ?

    you have banks of .wav recordings of vowels and consonants,
    for example you record the sound 'A'
    UTAU can detect which note this sounds like
    UTAU can shift the pitch of that note to make you sing 'A' in any note of any octave
    you lay out your notes and your vowels/consonants on a staff
    and that's it, you get synthesized singing


    example (not by me ) https://www.youtube.com/watch?v=nWodEKXX7Mw

    note that most voice banks out there have licenses like "attribution share-alike non-commercial" and other restrictions

    utau.jpg
    1784 x 859 - 418K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited December 1969

    The release/manual page will be located here: https://sites.google.com/site/mcasualsdazscripts5/mcjmidikit

    tomorrow probably, i'll at least post the MidiLoader

    it creates a midi node with up to 16 channel nodes, each channel node contains the notes on-off events as labeled properties

    i'll probably also post a script which lets you do some animation using it

    the real script to build more complex animations will come later

    the third upcoming script is a sort of specialized pose-animation saver
    for example to store the animation for Amy's Right arm bringing down a drum stick on the snare

    it was almost ready, then i tested the Pink Floyd/Syd Barett song "Bike"
    and realised i need to support variable tempo and even variable signatures !

    see this midi track ... just for that purpose

    
    MFile 1 7 240
    MTrk
    0 Meta SeqName "Bike-Pink Floyd"
    0 TimeSig 4/4 24 8
    0 Tempo 545455
    1920 TimeSig 6/4 24 8
    3360 TimeSig 4/4 24 8
    4320 TimeSig 5/4 24 8
    5520 TimeSig 4/4 24 8
    8400 TimeSig 6/4 24 8
    9840 TimeSig 4/4 24 8
    12720 TimeSig 7/4 24 8
    14400 TimeSig 4/4 24 8
    19200 TimeSig 6/4 24 8
    20640 TimeSig 4/4 24 8
    22560 TimeSig 6/4 24 8
    24000 TimeSig 4/4 24 8
    28800 TimeSig 6/4 24 8
    30240 TimeSig 4/4 24 8
    33120 TimeSig 5/4 24 8
    34320 TimeSig 2/4 24 8
    34800 TimeSig 4/4 24 8
    38640 TimeSig 6/4 24 8
    40080 TimeSig 4/4 24 8
    40320 Tempo 560748
    40560 Tempo 571429
    40800 Tempo 588235
    41040 Tempo 600000
    41280 Tempo 600000
    41520 Tempo 600000
    41760 Tempo 600000
    42960 TimeSig 5/4 24 8
    44160 TimeSig 4/4 24 8
    45120 TimeSig 3/4 24 8
    45840 TimeSig 3/8 12 8
    46200 TimeSig 4/4 24 8
    46200 Meta TrkEnd
    TrkEnd
    bike.jpg
    800 x 450 - 226K
  • KeironKeiron Posts: 413
    edited March 2015

    "Well spotted "

    Tempo as for music. The speed at which music is or ought to be played, often indicated on written compositions by a descriptive or metronomic direction to the performer.
    For example, a tempo of 60 beats per minute signifies one beat per second, while a tempo of 120 beats per minute is twice as rapid, signifying one beat every 0.5 seconds.

    Time signature

    The number in the top of the time signature tells a player how many of a certain kind of note there are in each measure. The number in the bottom of the time signature tells what kind of note is used a certain number of times in each measure. The number on the bottom of the time signature can be any number that follows the pattern 1, 2, 4, 8, 16, 32..., where each number in the pattern is two times the number that came before it. So, 64 could be a number that is put in the bottom of the time signature, but 65 could not be one.[1]

    Number on the bottom of the time signature What it means
    1 A whole note lasts one beat
    2 A half note lasts one beat
    4 A quarter note lasts one beat
    8 An eighth note lasts one beat
    16 A sixteenth note lasts one beat

    Post edited by Keiron on
  • Richard HaseltineRichard Haseltine Posts: 100,604
    edited December 1969

    http://www.daz3d.com/forums/viewreply/36865/

    Added to the index, but I don't think the description is terribly helpful - can you suggest a (brief) alternative?

  • mCasualmCasual Posts: 4,607
    edited December 1969

    http://www.daz3d.com/forums/viewreply/36865/

    Added to the index, but I don't think the description is terribly helpful - can you suggest a (brief) alternative?

    maybe - generate animations from midi file music notes

  • KeironKeiron Posts: 413
    edited December 1969

    maybe

    "MIDI Animator"

  • KeironKeiron Posts: 413
    edited December 1969

    Hi I created a test MIDi and a WAV file from my Keyboard

    Added this to the Pose dir in Poser 10

    Then after rendering the Video using the MP4 option in Poser

    I must admit I haven't seen the MP4 option appear in Daz Studio?

    Using Magix Movie Edit Pro , I aligned the Video with the WAVE file

    Not to bad a result for a start

    click here if you would like to see

    http://youtu.be/Xs_qKy_F9BA

    I'm really looking forward to seeing your work, so we can Animate things as well using Daz

    Kind wishes

    Keiron

  • Richard HaseltineRichard Haseltine Posts: 100,604
    edited December 1969

    Casual said:
    http://www.daz3d.com/forums/viewreply/36865/

    Added to the index, but I don't think the description is terribly helpful - can you suggest a (brief) alternative?

    maybe - generate animations from midi file music notes


    Thanks, I updated to use that.
  • mCasualmCasual Posts: 4,607
    edited December 1969

    keiron said:

    Hi I created a test MIDi and a WAV file from my Keyboard

    Added this to the Pose dir in Poser 10

    Then after rendering the Video using the MP4 option in Poser

    I must admit I haven't seen the MP4 option appear in Daz Studio?

    Using Magix Movie Edit Pro , I aligned the Video with the WAVE file

    Not to bad a result for a start

    click here if you would like to see

    http://youtu.be/Xs_qKy_F9BA

    I'm really looking forward to seeing your work, so we can Animate things as well using Daz

    Kind wishes

    Keiron

    yes looking good

    Daz Studio only exports in avi
    though the avis can use compressors like DivX which is mpeg4
    it's often better to save your scene before using special compressors, they tend to crash the program
    safest is no-compression but the avi files are huge
    i often render uncompressed or as jpeg sequences then use VirtualDub to to the DivX compression
    plus it's easy to crop, resize and add overlays in virtualdub

  • mCasualmCasual Posts: 4,607
    edited December 1969

    Casual said:
    http://www.daz3d.com/forums/viewreply/36865/

    Added to the index, but I don't think the description is terribly helpful - can you suggest a (brief) alternative?

    maybe - generate animations from midi file music notes


    Thanks, I updated to use that.

    thanks for doing this !

    someday i may make a nice list of links and short descriptions,
    so you could add the missing ones without too much work!

  • mCasualmCasual Posts: 4,607
    edited December 1969

    Misstick playing the first 4 notes of "Bike"
    the piano keys were pressed by a program
    but the hands had to be manually posed
    the script will also let notes create lasers
    and well anything, including balls bouncing off xylophones.

    i 've worked on making the script able to cope with tempo changes
    because it complicates the conversion between midi timestamps and "real" time

    still got to fully understand the global midi "divisor" and the time signatures

    pianah.jpg
    1280 x 720 - 487K
  • mCasualmCasual Posts: 4,607
    edited December 1969

    New 30 second video showing excellent synchronization of a keyboard with midi music

    https://www.youtube.com/watch?v=N_NIBHZLUGc

  • KeironKeiron Posts: 413
    edited December 1969

    Very well done

    Keep up the great work.

    Just an idea

    In the MIDI data some notes are in the same time stamp
    block or very close

    if you can somehow recognise when all the notes play at the same time, there's a good bet it's a chord

    for example c

    left hand c-e-g-c or c-e-g or e-g-c or g-c-e or c-eflat-g ect

    right hand simular but higher up the scale

    That may then allow you to position the hand to the correct Octive, maybe locking it to a specific note or set of notes

  • mCasualmCasual Posts: 4,607
    edited December 1969

    keiron said:

    .... position the hand ........

    there's a script of mine, mcjAutolimb, that will help animate the arms
    you select a null node, select a hand or a finger and the script makes all the arm pose'ing needed
    to bring the hand or finger at the null node location

    since i want to get back to completing other ongoing projects
    i'll only write a standalone tool for rough wrist positioning

    in the case of Pink Floyd/Syd's Bike piece, the left hand was 1 note, and that note was always on the same midi track
    the right hand was on the 3 other tracks, so i could have a script position 2 null nodes at the average note positions
    the user will select the tracks for each hand.

    one could even write a silent midi track for the wrists and use that for wrist positioning

  • mCasualmCasual Posts: 4,607
    edited March 2015

    here's the solution i came up with

    the keyboard must contain 2 null nodes indicating the beginning and end of the keyboard

    first i gather all the midi Note-on / Note-Off events
    i sort them by time
    i group them by timestamp

    then for each group of notes at each timestamp
    i assign the notes (keys) to a hand
    according to their distance from the current wrist positions

    for each hand i compute the average note

    the new wrist position is moved to that average note position

    note that inevitably some limit cases will lead to nonsensical situations( notably when hands cross )
    but most of the wrist positions should be a-ok

    playah.jpg
    1665 x 1080 - 424K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited March 2015

    Auto-wrist-positioning tool

    Video demo!

    https://www.youtube.com/watch?v=P29kp7sluzI

    The midi-to Daz Studio kit of scripts
    will include a script which attempts to assign keys being played to each hand
    and mark the position where the wrists should be positioned.
    Then using a script like mcjAutoLimb, you can make a figure's hand follow those markers.

    So it's not a fully automated solution, but i believe it can save many hours of work for music-video projects

    you'll notice that there's collisions between hands at time and other times
    when the right hand mistakenly takes the responsibility for a key that was intended for the left hand
    So there will always be a certain amount of corrections to be done by a human


    i discovered that mcjAutolimb when run on a 3000+ frames animation
    will eat up very large amounts of memory ( at least on DS3 )
    2 or 3 GB, same goes about mcjKeepOrient ---

    that's mainly because the "Undo" mechanisms store
    a trace of the millions of operations that
    happened when using those scripts

    since both these scripts were needed to do the arms animation
    i'll probably post very soon versions with no "Undo"

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

    Hi Casual

    Well impressed, very cool

    Great Keyboard hand positioning

    Finger positioning could be very individual to each player. You could use Power Pose or an Animate block
    for the last finger detail

    Good point about the memory load, I moved to Windows 64 Bit operating System and use the Daz Studio 64 bit version
    I've installed 24 Gig of Memory. I know Daz Studio can only render to 4 Gig Video with the 64 bit version, that's why I export single frames and rebuild it, However I' m not sure If Daz Studio will use all the available Memory for normal actions. I hope so

    Just a thought reguarding the hand collisions, it would be quite normal for hands to cross over or under each other, so if the MIDI Data was clear for say the left hand, maybe it could be slightly lifted and moved to allow the right hand to pass under or maybe use some form of hand colision detection to take an action

    Thank you for all your Hard Work

    Kind wishes

    Keiron

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

    workin on the midi project today!

    featuring the new Wurzkeil keyboard

    rendamidi.jpg
    1920 x 1080 - 814K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited March 2015

    the music sheet stand will be added to the Wurzkeil prop soon

    Amy, Misstick and Toobina in the practice space ( and Gene?, explore the space! )

    ---
    example of a profile for the mcjWurzkeil keyboard prop

    this file format should be adaptable to other keyboards
    for example, keyboards with vertically moving keys
    if the given keyboard uses morphs instead of rotations/translations
    then the control type "morph" can be used
    if the keyboard is a color organ, then the control type "color" can be used
    or the control type "strength" to animate the ambient strength of a color organ light for example

    
    // this is a midi instrument profile
    // this file is in a format which is only 
    // usable by the free daz script mcjPlayMidi
    // path midi CtlType CtlName Off On
    mcjWurzkeil/notes/note00 24 property XRotate 0 7
    mcjWurzkeil/notes/note01 25 property XRotate 0 7
    mcjWurzkeil/notes/note02 26 property XRotate 0 7
    ...
    mcjWurzkeil/notes/note60 84 property XRotate 0 7
    practice.jpg
    1920 x 1080 - 846K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited March 2015

    the keyboard animator ( or anything vaguely like a keyboard )
    will include materials animationability :)

    the profile for this keyboard
    ( didnt you see it's a new free prop !! )
    and ambient strength animation
    is a text file like this

    a typical line

    mcjWurzkeil/notes/note00 24 matprop 0/Ambient Strength 0 1
    

    means

    if midi note 24 ( note = C of the second octave ) is played
    search for the keyboard named "mcjWurzkeil"
    and in mcjWurzkeil, find something named "notes"
    and in notes, find something named "note00"
    look in the materials of note00
    take the first material ( it could be a material name instead of number 0 )
    find the property named "Ambient strength"
    if the note is off, set ambient strength to 0
    if the note is on, set ambient strength to 1 (100%)


    
    // this is a midi instrument profile
    // this file is in a format which is only 
    // usable by the free daz script mcjPlayMidi
    // path midi CtlType CtlName Off On
    mcjWurzkeil/notes/note00 24 matprop 0/Ambient Strength 0 1
    mcjWurzkeil/notes/note01 25 matprop 0/Ambient Strength 0 1
    mcjWurzkeil/notes/note02 26 matprop 0/Ambient Strength 0 1
    ...
    mcjWurzkeil/notes/note59 83 matprop 0/Ambient Strength 0 1
    mcjWurzkeil/notes/note60 84 matprop 0/Ambient Strength 0 1

    with Daz Studio 3 the daz scenes were properly saving material animations
    with Daz Studio 4 you'll have to use a special script of mine to save/load them

    colobike.gif
    320 x 180 - 944K
    Post edited by mCasual on
  • KeironKeiron Posts: 413
    edited December 1969

    Hi Casual

    Great looking Keyboard

    It would be cool if it could work on different Keyboards like an 88 Key Piano, Grand of Course LOL
    Perhaps a quick scan of the MIDI file would let you know what Octaves have been used
    full 88 keys, 61, etc

    Looking forward to tying out your program in the near future

    Great Job

    Best Wishes

    Keiron

  • mCasualmCasual Posts: 4,607
    edited March 2015

    keiron said:
    Hi Casual

    Great looking Keyboard

    It would be cool if it could work on different Keyboards like an 88 Key Piano, Grand of Course LOL
    Perhaps a quick scan of the MIDI file would let you know what Octaves have been used
    full 88 keys, 61, etc

    Looking forward to tying out your program in the near future

    Great Job

    Best Wishes

    Keiron

    i introduced the "profile file" to let you adapt the player script
    to any keyboard that has individually animatable keys
    you only need a text editor like notepad ( i used Excel actually )
    to create that profile file for an up to 128 keys keyboard

    each key needs a line of the form

    mcjWurzkeil/notes/note11 35 nodeprop XRotate 0 7
    

    note that '35' is the midi note number

    my mcjWurzkeil keyboard keys are depressed by rotating them 7 degrees around the x axis

    if the keyboard keys were depressed by moving them 1.5cm down the Y axis

    mcjWurzkeil/notes/note11 35 nodeprop YTranslate 0 -1.5

    if the keyboard is a laser harp or a color organ the kine for each key looks like

    the profile file lines would look like

    mcjWurzkeil/notes/note09 33 matprop 0/Ambient Strength 0 1
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited March 2015

    i almost forgot

    new demonstration video showing midi-material animation

    and the mcjWurzkeil in action

    https://www.youtube.com/watch?v=lvixbCmzE2Q

    fig 1. - puzzling situation

    problem.jpg
    699 x 699 - 208K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited March 2015

    Amy will replace Misstick on the keyboard because her hands are more standard and can do octave-wide chords

    i worked some more on automating wrist placement

    one issue to solve is to avoid unnecessary wrist movements

    i'm getting good results, but only because i supplied the script with some preferred wrist positions for groups of notes

    i want that script to be applicable to any musical piece, albeit with results that will necessitate cleanup work on the animator's part


    i don't plan on working on that ( master's-thesis-worthy-topic ) for much longer, so it wont be a turn-key solution


    see here
    System for Automatic 3D Animation of Piano Performances, June 2010 – July 2012
    Role: Lead research assistant, directed by Professor Bernd Hamann and Michael Neff.
    http://graphics.cs.ucdavis.edu/~zhuy/Project1.html

    itshard.jpg
    960 x 540 - 306K
    igni.jpg
    960 x 540 - 274K
    wide.jpg
    960 x 540 - 363K
    zenmidi.jpg
    1920 x 1080 - 1M
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited December 1969

    there will be a small Utility script named mcjHands to help the creation of ( usually bird-eye-view ) hand poses

    mcjHandsimg.jpg
    1070 x 586 - 353K
  • RuphussRuphuss Posts: 2,631
    edited December 1969

    sorry casual as I do not know where else I could ask you this

    matanim works fine but the animation in the surface tab is not save able in a studio 4.7 szene

    any help ?

  • KeironKeiron Posts: 413
    edited December 1969

    Hi Casual

    Looking cool, great job

    I was using the Genesis Gorilla in one of my renders for fun, but the thumbs were to short LOL" however you could possible cheat and grow the finger" The legs were also a problem as they were to short to touch the pedels, the way I got around that was to reduce the height the Keyboard and Chair

    Placing the Thumb and Pinki right on the edge of the front of a key, may assist in getting a really wide hand profile. With practice you could get over an Octave spacing

    Kind wishes

    Keiron

Sign In or Register to comment.