Mioplanet Lab
Research & Development
SEARCH
     Home | Multimedia Experimentation | Percussion

  Topics
Multimedia Experimentation
MioScript Experimentation
Software Experimentation
Robotics
Finger Driven Applications
Musical Gadgets
Miscellaneous

  Multimedia Experimentation
Percussion
Live Animator

Percussion


 A small musical instrument to play percussion.

Percussion
Mioplanet Lab - Research & Development

The goal was to increase the feeling of playing with a true instrument using visual and sound effects.

Right click to close.

Thanks to Jacques Deskplat for the design. 



Try percussion.exe


 You can download and try the application.
This application is a prototype and some features may not work as expected on your computer.

 
 
Filepercussion.exe
Size531 Kb
PlatformWindows 98, ME, NT4, 2000, XP, Vista
Start Download Now
Safe Download



Download Source Code


 The full source code is provided as a Mio Archive File.
With MioFactory, you can open this archive file, edit the source code and test the result.

 
 
Filepercussion.mioa
Size45 Kb
FormatMioFactory Archive File
Start Download Now
 



MioScript Source Code

 MioScript is a scripting language aimed to create any kind of applications.
A free version of MioFactory is available to compile MioScript applications. 



 main.k 


Event.Load
      extern.close("{APP_NAME}") // Only one instance allowed
      app.init("{APP_ID}", "{APP_NAME}", "{APP_VERSION}", "{APP_BUILD}", "{CREATE_LOG}")
      
      app.booster(true)
      
      &iMem = draw.mem.create()
      draw.&iMem.load(path.rsc("Back.bmp"))
      draw.&iMem.load(path.rsc("Face.bmp"), 145, 0)

      &Sound = "Conga.wav"
      for(&ptr, 0, 4)
            &Ch[&ptr] = sound.channel.create(path.rsc(&Sound))
            sound.&Ch[&ptr].volume(900 + &ptr*20)
      for.next

      for(&ptr, 0, 4)
            &Echo[&ptr] = 100
      for.next

      &Size = 50
      &x = 50
      &y = 50
      window.main.pos.now(250,250,0,0)
      window.main.shape.load(path.rsc("Face.bmp"), true, true)
      window.main.visible(true)
      doEvent.waitTimer()
event.end

event.mouse:down
      &mx = mouse.main.x()
      &my = mouse.main.y()
      &Note = 0
      If(num.isInRect(&mx, &my, 14, 51,40, 40) = true)
            &Note = 75
      If.End
      If(num.isInRect(&mx, &my, 51, 17,31, 31) = true)
            &Note = 150
      If.End
      If(num.isInRect(&mx, &my, 97, 24,25, 25) = true)
            &Note = 250
      If.End
      If(num.isInRect(&mx, &my, 116, 60,22, 20) = true)
            &Note = 340
      if.end
      if(num.isInRect(&mx, &my, 111, 92,17, 16) = true)
            &Note = 425
      if.end

      if(&Note > 0)
            var.inc(cCh,1,4,0)
            var.inc(Tremolo, 148)
            &x[&cCh] = &mx
            &y[&cCh] = &my
            &Echo[&cCh] = 0
            sound.&Ch[&cCh].rate(&Note + num.cos(&Tremolo, 5))
            sound.&Ch[&cCh].position(0)
            sound.&Ch[&cCh].play()
      if.end
event.end

event.waitTimer
      draw.main.copyFrom.&iMem(145,0, 145, 125, 0, 0, 145,125, 50, true, 255)
      &ptra = time.chrono.stop()/150
      for(&i, 200, 360, 75)
            &a = num.cos(&i+&ptra/2, 100)+100
            draw.main.ellipse(num.cos(&i*2 + &ptra*2, &i/(&Size/20)) + &Size/8,num.sin(&i + &ptra*2, &i/(&Size/20))+ &Size/8,&Size, &Size, num.rgb(&a, &a, 0),&i/5, 20)                  
      for.Next
      draw.main.copyFrom.&iMem(0,0, 145, 125, 0, 0, 145,125,100, true, draw.&iMem.getPixel(28, 22))
      for(ep, 0, 4)
            If(&Echo[&ep]<100)
                  &Echo[&ep] = &Echo[&ep] + 10
                  draw.main.ellipse(&x[&ep]-&Echo[&ep]/2, &y[&ep]-&Echo[&ep]/2,&Echo[&ep], &Echo[&ep],num.rgb(150,0,0), 10, 40-(&Echo[&ep]/3))
            if.end
      for.next
      draw.main.paint()
      doEvent.waitTimer(10)
event.end


In the same topic


 
Multimedia Experimentation
Mioplanet Lab - Research & Development
Multimedia Experimentation
Various projects and applications involving visual and sound effects.

Live Animator
Mioplanet Lab - Research & Development
Live Animator
An application aimed to add animations to MP3 musics or to add visual effects to live shows.