WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

pitch or roll to midi-note??
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie
View previous topic :: View next topic  
Author Message
jjcomet



Joined: 23 Apr 2007
Posts: 87

Digg It
PostPosted: Tue May 01, 2007 8:41 pm    Post subject: pitch to midi note

Dood!!
it's the swedishfrog
I knew i could count on you

cheers everyone
Brendan
Back to top
View user's profile Send private message
jjcomet



Joined: 23 Apr 2007
Posts: 87

Digg It
PostPosted: Tue May 01, 2007 10:02 pm    Post subject: pitch to midi note

Yeah, I was way too vague for this to work the way I had envisaged. The suggested ideas work fine; but this is exactly what I hope to achieve, and the math is way beyond me:
-90 degrees pitch = 0
90 degrees pitch = 100

'zone'1 = 0-25
'zone'2 = 26-50
etc, and the 'if loops' are working and triggering fine, but:

when the wiimote enters a 'zone' I hope to trigger a note......once, even if it stays in that zone (attempts so far obviously result in reiterations of that note if the wiimote remains in that zone). Then, if (then if then if then if Confused ) the wiimote enters the next zone it will trigger the next note......once. I think I saw a variant in a script here that creates a sort of 'if x=first-time then'. Couldn't find it again though; but then the notes will trigger once and once only!? I'd need to retrigger a note (once) if the wiimote re-enters a zone.
Gentle hints in the right direction would help immensely everyone....
Thanks, and PS this is all in a very good cause.
Brendan
Back to top
View user's profile Send private message
SwedishFrog
Site Admin


Joined: 25 Jan 2007
Posts: 273
Location: New York

Digg It
PostPosted: Wed May 02, 2007 1:56 am    Post subject:

You used the pressed() function to do that

Code:

if pressed(var.note > 25 and var.note < 75) then
    //do your thing
endif
Back to top
View user's profile Send private message Visit poster's website AIM Address
jjcomet



Joined: 23 Apr 2007
Posts: 87

Digg It
PostPosted: Wed May 02, 2007 7:14 am    Post subject: pressed? that's it

i can't believe it's that simple Very Happy

you rock my wiimote; thanks a million
Brendan
Back to top
View user's profile Send private message
tic



Joined: 18 Feb 2007
Posts: 121

Digg It
PostPosted: Wed May 02, 2007 9:27 pm    Post subject:

just give me the order of the notes to go in and whether you want it to roll or pitch. will take 2 minutes, but i cant be bothered to get my wiimote Smile
Back to top
View user's profile Send private message
jjcomet



Joined: 23 Apr 2007
Posts: 87

Digg It
PostPosted: Thu May 03, 2007 9:29 am    Post subject: pitch and roll to midi notes

Hi
thanks for the help, but, like all good little noobs do, i decided to read the documentation that comes with glovepie and i think i sussed it; with some help from 'SwedishFrog' too: it looks something like this

var.note = MapRange (WiimoteSmoothPitch -90, 90, 0, 100)

if pressed (var.note>0 and var.note<25) then
midi.C5 = true else
midi.C5 = false
endif

//repeat above for each 'zone' and note

google: AudioMulch.
thanks
Brendan
Back to top
View user's profile Send private message
tic



Joined: 18 Feb 2007
Posts: 121

Digg It
PostPosted: Thu May 03, 2007 8:09 pm    Post subject:

This is getting a little annoying. could you put your code as code like everyone else. another thing: do you ever check whether what your write works or not, as for example, what youve written will not work in glovepie, so why post it? yu say youve sussed it, but what youve written will do nothing.

could you just give a list in order of what the notes you want to be from lowest to highest and say whether you want it pitch or roll. this is a very easy script to write, but no-one can really help if you dont clarify what you want. sorry to say all this, but i just want to help! Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group