VRML-MIDI 
Author Message
 VRML-MIDI

is anybody here able to answer me :
do a VRML-MIDI interface already exists?

* Sent from AltaVista http://www.*-*-*.com/ Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful



Fri, 30 Aug 2002 03:00:00 GMT  
 VRML-MIDI
| do a VRML-MIDI interface already exists?
Your question is a little terse so I will answer the one I think you are
asking...

Just use an anchor to hyperlink to your midi file. The browser fires up the
associated midi playing device! So simple, yet it took me a long time to
figure it out.

Working example...
http://philliphansel.com/anchor_midi.wrl

The code....
#VRML V2.0 utf8
WorldInfo {
 title "anchor_midi"
 info [
  "This vrml World was created with Spazz3D, a VRML 97 authoring tool"
  "www.spazz3d.com"
 ]

Quote:
}

DEF dad_GROUND Transform {
 children [
  DEF GROUND Group {
   children [
    DEF dad_Group1 Transform {
     translation 0.12647 0.17706 0.0
     children [
      DEF Group1 Anchor {
       url "wearymarch.mid"
       description "weary march midi"
       children [
        DEF dad_Box1 Transform {
         translation -0.10118 -0.07588 0.0
         children [
          DEF Box1 Shape {
           appearance Appearance {
            material DEF Red_mat Material {
             ambientIntensity 0.200
             shininess 0.200
             diffuseColor 1.0 0.0 0.0
             emissiveColor 0.0 0.0 0.0
             specularColor 0.0 0.0 0.0
            }
           }
           geometry Box {
            size 1.0 1.0 1.0
           }
          }
         ]
        }
        DEF Sensor1 TouchSensor {
        }
       ]
      }
     ]
    }
   ]
  }
 ]
Quote:
}

--
---
Mr. Phillip

http://www.philliphansel.com
---

| is anybody here able to answer me :
| do a VRML-MIDI interface already exists?
|
|
| * Sent from AltaVista http://www.altavista.com Where you can also find
related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is
Beautiful


Sat, 31 Aug 2002 03:00:00 GMT  
 VRML-MIDI

But in case it is not that question...
Things get more complicated if you want to send MIDI events to a device. In
that case you have to build your own MIDI node. That was actually my project
back in '95 at the Banff Centre; to implement a "Sound" node. That node was
just sending MIDI note on/off and panning/volume continuous control trough a
MIDI port using OpenInventor and SGI MIDI library (it was VRML1.0). MIDI output
was then sent to a Mac running Max (the descendant of MusicV, not 3D Studio) to
proccess the events and control an internal sampler (Sample Cell).

The implementation of the node was simple; a distance based calculation
(derivated from LOD thx to Gavin Bell) was triggering note on/off as the user
entered/exited the sound zone and while inside, its position calculated for
panning and volume from the center of the sound. First instance of the node
initialize the MIDI port.
Today, I think I would use JAVA inside a Script for the calculation and I will
try to get access to a MIDI port directly from the Script. I would probably
extend it so it can handle different MIDI event mapper as well (like mapping a
touchsensor hitPoint_changed to pitch bend for example).
It would look something like this (under reserve...):
First get a MIDI port for the whole world
PROTO MIDIPortInterface [
    eventIn    SFInt32 toStandardMIDIEvents # SFInt32 should hold a whole MIDI
message
    --
    --
]{
DEF MIDIPort Script {
    eventIn SFInt32 event IS whatever
    -- --
    mustEvaluate TRUE # cant take chance....
    url ["javaGetMIDIPort.class"] # where you access (hopefully)

Quote:
}                          # a MIDI port in initialize method
}

# Now DEF the MIDI port so it can be used inside all MIDISound
DEF MIDIPort MIDIPortInterface{}
# as MIDISound could look like this
PROTO MIDISound [
    eventIn    SFInt32 toNoteNumber
    eventIn    SFInt32 toPitchBend
    eventIn    SFInt32 toVelocity
    field      SFInt32 channel    1
    field      SFInt32 baseNote   64
    field      SFVec3f size       100 100 100
    field      SFNode  MIDIPort   NULL # here the MIDIPort will be USE
]
{
    DEF PS ProximitySensor { size IS size } # just to simplifie
    DEF MIDISound Script {
        eventIn SFBool  isActive
        eventIn SFInt32 toNoteNumber IS toNoteNumber
        eventIn SFInt32 toPitchBend IS toPitchBend
        eventIn SFInt32 toVelocity IS toVelocity
        field   SFInt32 channel  IS channel
        field   SFInt32 baseNote IS baseNote
        field   SFNode  port IS MIDIPort
        mustEvaluate TRUE # again....
        directOutput TRUE
        url ["javaToProccessVRMLToMIDIEvents.class"]
    }
    ROUTE PS.isActive to MIDISound.isActive
Quote:
}

Of course, it may look nice but I evacuated the most potent problematic it
could be encountered; that is how do you get that MIDI port!?
Just first though but it is the way I would begin investigating.
Hope it can be of some use or give some ideas since MIDI used that way open a
lot of interesting possibility.
And I dont know well the PC in this area as I dont have time for this now.
Plus, I dont even have my speaker plugged on the computer.....
cordonnier mal chauss......

Sylvain Carette
VRML designer-was-once-a-composer

Quote:

> | do a VRML-MIDI interface already exists?
> Your question is a little terse so I will answer the one I think you are
> asking...

> Just use an anchor to hyperlink to your midi file. The browser fires up the
> associated midi playing device! So simple, yet it took me a long time to
> figure it out.

> Working example...
> http://philliphansel.com/anchor_midi.wrl

> The code....
> #VRML V2.0 utf8
> WorldInfo {
>  title "anchor_midi"
>  info [
>   "This VRML World was created with Spazz3D, a VRML 97 authoring tool"
>   "www.spazz3d.com"
>  ]
> }
> DEF dad_GROUND Transform {
>  children [
>   DEF GROUND Group {
>    children [
>     DEF dad_Group1 Transform {
>      translation 0.12647 0.17706 0.0
>      children [
>       DEF Group1 Anchor {
>        url "wearymarch.mid"
>        description "weary march midi"
>        children [
>         DEF dad_Box1 Transform {
>          translation -0.10118 -0.07588 0.0
>          children [
>           DEF Box1 Shape {
>            appearance Appearance {
>             material DEF Red_mat Material {
>              ambientIntensity 0.200
>              shininess 0.200
>              diffuseColor 1.0 0.0 0.0
>              emissiveColor 0.0 0.0 0.0
>              specularColor 0.0 0.0 0.0
>             }
>            }
>            geometry Box {
>             size 1.0 1.0 1.0
>            }
>           }
>          ]
>         }
>         DEF Sensor1 TouchSensor {
>         }
>        ]
>       }
>      ]
>     }
>    ]
>   }
>  ]
> }
> --
> ---
> Mr. Phillip

> http://www.philliphansel.com
> ---


> | is anybody here able to answer me :
> | do a VRML-MIDI interface already exists?
> |
> |
> | * Sent from AltaVista http://www.altavista.com Where you can also find
> related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is
> Beautiful



Sat, 31 Aug 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VRML, MIDI and Cosmo Player

2. English/Fran?ais: VRML and Midi files ?

3. VRML and MIDI

4. midi steuert vrml?

5. architecture to transform VRML world with MIDI ?

6. MIDI->JAVA->VRML

7. midi<>vrml

8. midi+vrml

9. MIDI file parser, MIDI classes

10. from near VRML to REAL VRML : My first EAI / Java / VRML Humanoid Avatar

11. IE6 +VRML + javascript in VRML trouble (was: problem using javascript window.open in VRML)

12. MIDI for APL2/PC?

 

 
Powered by phpBB® Forum Software